Spencer Arduino Uploading Code

After setting everything up, we can move on to uploading code to your Spencer.

Choose what to upload

You can either write your own simple program or download one of the games from our Github repository to use as a starting point. 

Here's an example of a simple code you can upload:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include <CircuitOS.h>
#include <Spencer.h>
 
void setup() {
	Spencer.begin();
	Spencer.loadSettings();
 
	LEDmatrix.startAnimation(new  Animation( new SerialFlashFileAdapter("GIF-heart.gif")), true);
}
void loop() {
	LoopManager::loop();
}


Let's make sure your Spencer is ready for the upload!

Turn on your Spencer and plug it into your computer with a USB cable. 

Next, in Arduino go to Tools -> Port, and select the port your Spencer is connected to. It’s usually the only option available.



Then, click the Upload button (arrow pointing to the right).