Error creating program with CircuitBlocks

Hi,

I’m trying to create a really simple ‘hello world’ program in CircuitBlocks for Nibble, but I’m getting an error. See attached screenshots. I can’t find a way of getting more info about what the error is.

Hey Ben,

Thanks for supporting our work and I am sorry for the issue you’ve encountered.

Can you please provide me with any information you find relevant?
Which OS are you using (I am guessing windows by the looks of the screenshot). Did you download the latest version of circuitblocks?

Hi Ben. I haven’t been able to reproduce this here - I’m running CircuitBlocks on Windows 10 and the exact same Blocks sketch compiles and installs for me. I will say that all it does is to flash the screen white repeatedly - as you will see in this comment from Filip, you need to do a few other things (set the font, size and colour, and draw the text to the sprite), for this to work.

I’m not seeing a compile error. I did some digging into CircuitBlocks and managed to enable logging locally for Arduino-CLI (the tool it runs under the covers to try to build and install code to the Nibble), but since I’m not able to reproduce the same issue, I’m not sure how useful it will be to you. You can try setting the value of file to "cb.txt" in the file C:\Users\[yourusername]\AppData\Local\Arduino15\arduino\arduino-cli.yaml and try again - the output will be written to C:\Users\[yourusername]\AppData\Local\Arduino-cli\cb.txt - but I’m not certain if it will show code compilation errors without other settings being adjusted.

OK, here’s how I’ve debugged some code that did fail to compile in CB - I’d made some mistakes, so I ran the compile manually. In PowerShell on Windows 10:

> cd C:\Users\[myusername]\AppData\Local\Arduino-cli\
> .\arduino-cli.exe compile -v -b cm:esp8266:nibble 'C:\Users\[myusername]\AppData\Local\Temp\circuitblocks\sketch\'

This location is where the CircuitBlocks editor stores the currently-open sketch. When I compiled from the command line, I was able to see the mistakes I’d made in the code. The ideal thing would be for the editor to show these errors inline, or at least to grab the error output from the compiler and display, but this is a workaround if you want to check your own code.

Hey, guys!

Let me just chime in on what is going in the background of CircuitBlocks. When CB starts, it launches the arduino-cli daemon. The arduino-cli daemon is basically the Arduino IDE running in the background, allowing CB to ask it to compile sketches and upload them to your Nibble or Ringo.

When any error happens during compilation or upload, it gets logged to an in-memory buffer. When you go to your CB home screen, and scroll to the bottom, in the footer, you can see a “Send error report” link, which when clicked, will open a prompt to send us that buffer, along with any relevant system information that might help us resolve your issue. The prompt, before sending anything to our servers, displays all the info that will be sent so you can inspect it.

You can then send that report, and tell us your report ID, so we can personally dig in to the issue you’re experiencing, or use that report that would be sent and try to resolve the issue if you have the know-how.

Coming to the issue that @Ben_Everard is having, that does not seem like an issue with missing font configurations, but rather either a bug due to a specific edge case system configuration, or a bug in CircuitBlocks’ code generation system. It would greatly help us if you could open up CircuitBlocks, replicate the error, then go back to your home screen and send an error report. Send us an email to [email protected] with your report ID so we can get in touch and solve your issue.

@andypiper any compile time messages and warnings or errors also get logged to the error report buffer. If you would like to inspect the messages from the compiler or uploader, you can open the “Send error report” prompt and copy the report into a word processor or notepad, to get a better look. In one of the future versions of CircuitBlocks, we will add a compile message window so debugging compile errors will be easier.

Filip

1 Like

Again this is super useful. I did discover today that clicking the report error link gave a bunch of config info that I considered adding to my post here to help Ben. Thanks. Great to understand more. Maybe the beginning of a wiki page or a “advanced user debugging” tutorial :slight_smile: we can help to build that sort of thing with you!