0

Program included with Adabox 015?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Program included with Adabox 015?

by majotito on Thu Jul 30, 2020 5:41 pm

I wanted to investigate the functions of the program that was included with Adabox 015, but I'm not sure where to find the source code. I'm guessing it's all Arduino code, as I don't see any Python files when I attach the Clue to the laptop with the double-tap of the reset button. I'd like to change the program to something new but wanted the option to put the demo program back on if I wanted to.
When mounted as a drive, I see only 3 files, "CURRENT.UF2", "INDEX.HTM" and "INFO_UF2.TXT".

majotito
 
Posts: 25
Joined: Tue Jun 04, 2013 8:17 pm

Re: Program included with Adabox 015?

by adafruit_support_carter on Thu Jul 30, 2020 8:08 pm

If you copy CURRENT.UF2 to somewhere, you can then copy it back later to recover the program.

It may also help to rename it after you copy it, so you'll remember what it is. You don't need to rename it back to CURRENT.UF2 when copying it back over. Just go into bootloader mode and drag the file over.

adafruit_support_carter
 
Posts: 20281
Joined: Tue Nov 29, 2016 2:45 pm

Re: Program included with Adabox 015?

by majotito on Thu Jul 30, 2020 8:23 pm

Thanks. Is this complied code? I was wondering if this was reconfigurable and/or able to be modified?

majotito
 
Posts: 25
Joined: Tue Jun 04, 2013 8:17 pm

Re: Program included with Adabox 015?

by adafruit_support_carter on Thu Jul 30, 2020 8:24 pm

Yep. It is compiled code. But unfortunately you can't alter it in its UF2 form.

adafruit_support_carter
 
Posts: 20281
Joined: Tue Nov 29, 2016 2:45 pm

Re: Program included with Adabox 015?

by majotito on Thu Jul 30, 2020 8:33 pm

OK. Will this be available or be posted somewhere are uncompiled code?

majotito
 
Posts: 25
Joined: Tue Jun 04, 2013 8:17 pm

Re: Program included with Adabox 015?

by kevinjwalters on Fri Jul 31, 2020 3:42 pm


kevinjwalters
 
Posts: 959
Joined: Sun Oct 01, 2017 3:15 pm

Re: Program included with Adabox 015?

by majotito on Sat Aug 01, 2020 4:08 pm

Almost, maybe? Exploring from there, I think it might be in "adabox015_clue_plotter" found here:
https://github.com/adafruit/Adafruit_Ar ... oard_tests
But, I have not tried it yet. Thanks.

majotito
 
Posts: 25
Joined: Tue Jun 04, 2013 8:17 pm

Re: Program included with Adabox 015?

by adafruit_support_carter on Sat Aug 01, 2020 5:30 pm

OK, code is available here now:
https://learn.adafruit.com/adabox015/demo-code
check it out.

adafruit_support_carter
 
Posts: 20281
Joined: Tue Nov 29, 2016 2:45 pm

Re: Program included with Adabox 015?

by majotito on Sat Aug 01, 2020 5:32 pm

That is awesome! Thanks a lot!

majotito
 
Posts: 25
Joined: Tue Jun 04, 2013 8:17 pm

Re: Program included with Adabox 015?

by majotito on Sat Aug 01, 2020 8:51 pm

OK, So this is weird. I used the files from the links:
https://learn.adafruit.com/adabox015/demo-code
I got the new libraries and board updated in the Arduino IDE. I selected Adafruit CLUE in the board manager.
It compiles and uploads, with some warnings. BUT: the code runs really slow, and the colors on some parts are wrong. For instance, the "Spirit Level" shows the moving dot as red in the center, but blue when outside the center.
================ = = = These are the warnings:
Warning: Board attiny:variants:trinket5 doesn't define a 'build.board' preference. Auto-set to: VARIANTS_TRINKET5
Warning: Board attiny:variants:gemma doesn't define a 'build.board' preference. Auto-set to: VARIANTS_GEMMA
Warning: Board attiny:variants:trinket3 doesn't define a 'build.board' preference. Auto-set to: VARIANTS_TRINKET3
WARNING: library Adafruit_WavePlayer_Library claims to run on samd architecture(s) and may be incompatible with your current board which runs on nrf52 architecture(s).
Sketch uses 210892 bytes (25%) of program storage space. Maximum is 815104 bytes.
Global variables use 18112 bytes (7%) of dynamic memory, leaving 219456 bytes for local variables. Maximum is 237568 bytes.
Upgrading target on /dev/cu.usbmodem1411201 with DFU package /private/var/folders/yp/5ks2gmm54bnd542z7xfjfbjw0000gn/T/arduino_build_739985/adabox015_clue_plotter.ino.zip. Flow control is disabled, Single bank, Touch disabled
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
############
Activating new firmware
Device programmed.
===================== = = =
When I copy the "ADABOX15_DEMO.UF2" into the CLUEBOOT directory, the CLUE resets and runs as it did when I first got it; fast and zippy, with the dot in the center green and when outside the center, it is red.
I looked at the code, and cannot figure out what is going on.

majotito
 
Posts: 25
Joined: Tue Jun 04, 2013 8:17 pm

Re: Program included with Adabox 015?

by majotito on Mon Aug 03, 2020 11:44 am

Hey-- Just to let you know I updated my boards and libraries again, and this seems to be OK now. Maybe a library update fixed something? I'm not sure what had made it run really slow and the colors display incorrectly, but it seems to run very fast and colors are correct now.
. . . I'm not sure what he first bunch of warnings mean, but they don't seem to matter on this build.

majotito
 
Posts: 25
Joined: Tue Jun 04, 2013 8:17 pm

Please be positive and constructive with your questions and comments.