Jay-D Arduino Uploading Code
After setting everything up, we can move on to uploading code to your Jay-D.
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:
Next, in Arduino go to Tools -> Port, and select the port your Jay-D is connected to. It’s usually the only option available.
Then, click the Upload button (arrow pointing to the right).
And that's it! You have now uploaded your code to the Jay-D. Great job!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#include <JayD.h> Display* display; Sprite* sprite; void setup() { JayD.begin(); display = &JayD.getDisplay(); sprite = display->getBaseSprite(); pinMode(PIN_BL, OUTPUT); digitalWrite(PIN_BL, LOW); sprite->clear(TFT_BLACK); sprite->setTextColor(TFT_WHITE); sprite->setTextFont(2); sprite->setCursor(0,0); sprite->print("Hello World!"); display->commit(); } void loop() { delay(1000); } |
Let's make sure your Jay-D is ready for the upload!
Turn on your Jay-D and plug it into your computer with a USB cable.
Next, in Arduino go to Tools -> Port, and select the port your Jay-D is connected to. It’s usually the only option available.
Then, click the Upload button (arrow pointing to the right).
And that's it! You have now uploaded your code to the Jay-D. Great job!