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 contact@circuitmess.com 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!

Hello
My name is Maxime from Paris and I am 11.
I am a beginner in CircuitBlocks device and program.
I have trouble when programming.
There are always "compil errorā€™ in my programs and I donā€™t know the method/technics to fix them
Could you help me, please?

Hey Maxime,

Please send us a screenshot of your sketch via contact@circuitmess.com and weā€™ll help

Thanks