Jewelbots Tutorials Lesson 1: Hello World

We assume you own a Jewelbot and have installed the Arduino IDE. For instructions on downloading the Arduino IDE, please see the Jewelbots website.

Let’s get started with coding your Jewelbot!

When you’re learning a new programming language, the first program you write is usually called “Hello World.” The purpose of a “Hello World” program is to get a basic program working in the new language you’re learning.

For many programming languages, this would be a program that prints “Hello, World!” For Jewelbots, since we can program the LEDs, the equivalent program would be lighting up a single LED.

When you open a new sketch (an Arduino code file) in the Arduino IDE and have the Jewelbots board selected, this is what you see:

void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}

Type the following two lines in the void loop section. Put them right below the line that says // put your main code here, to run repeatedly: and above }:

LED led;
led.turn_on_single(NE, BLUE);

Now your entire file should look like this:

void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
LED led;
led.turn_on_single(NE, BLUE);
}

Upload the code to your Jewelbot (for instructions, see the “How to code your Jewelbot” section on the Jewelbots website).

Unplug the Jewelbot from your computer. One of the four LEDs will light up in blue.

Congratulations! You wrote your first Jewelbot program. Let’s now learn why this worked! Read on in Lesson 2.