top of page

Hello Jewelbots!

Welcome back, so glad you decided to stop by. Today we are going to learn how to start programing Jewelbots AKA Hello World!!!!!!:):):)

Before we can start coding you need to install and setup Arduino IDE by following the instructions here and here. After everything is setup, go here to create your first program (called a sketch) and learn how to upload it.

Now that you are all set, open up Arduino IDE and create a new sketch!

We are going to write code that will use a timer, buzzer, and LEDs.

Before we start I should mention there are two places where we can put code in a sketch and these are called functions. There are the setup function and the loop function. The setup function means your code will only run once. The loop function means your code will run repetitively without stopping. Today we will use the loop function.

We are going to start with LEDs. An LED is a light emitting diode which the lights inside the Jewelbot are. Put the code below into the loop function.

LED led;

We just created an instance of an LED called led. We can really call it whatever we want, but for the purpose of this post we will stick with led.

Next we want to give a good entrance to our code. Let's start with some magenta lights.

led.turn_on_all(MAGENTA);

We just used led which is our instance from above. Then we called turn_on_all. In parentheses we said MAGENTA in all caps. NOTE. Color only works in CAPS. the code is a sentence telling the Jewelbot what to do. The English translation is turn on all lights as magenta.

PS: The available LED colors are: MAGENTA, CYAN, WHITE, YELLOW, BLUE, and GREEN

Now save your code and upload it to your Jewelbot, here is a screen shot of what uploading should look like.

The next part of our code is to tell the Jewelbot how long to hold the LED lights on magenta. We do this by using a timer instance. Now let's create a timer instance to go under our led one.

Timer timer;

Now that we have defined the timer we can call a function to have the Jewelbot wait. Put the following line after the line where we turned on the led.

timer.pause(5000);

Here we tell the Jewelbot to hold magenta for 5 seconds. Now we want our Jewelbot to buzz. So we are going to use the instance buzzer.

buzzer.short_buzz();

This translates to buzz a short buzz. Using Jewelbots Arduino IDE you also can do the these other buzzes

buzzer.extra_short_buzz(); buzzer.long_buzz(); buzzer.extra_long_buzz(); buzzer.really_long_buzz();

And to finish of our code we turn off our LED.

led.turn_off_all();

Now we string all of our code together so it looks like this:

LED led; Buzzer buzzer; Timer timer;

led.turn_on_all(MAGENTA); timer.pause(5000); buzzer.short_buzz(); led.turn_off_all

YAY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

You just learned how to do some basic Jewelbots coding in Arduino IDE using LEDs, timers, and buzzers. Now try coding yourself. There are lots of fun things you can do with what you know. Go have fun!

From a fellow coder, writer and imaginer -TC:)

You Might Also Like:
9008a9_0baa3911b4684318951d372e62317753-mv2_d_2479_3826_s_4_2
9008a9_886196286b894692952c6605ccb5828f-mv2_d_3024_4032_s_4_2
9008a9_0897045e13754db08536194133712a2a-mv2_d_4032_3024_s_4_2
9008a9_1e27b366639b4e0fae41b6bae1344371-mv2_d_4032_3024_s_4_2
9008a9_25726c37c2104f2d8ad63c94b9ec76de-mv2_d_1536_1680_s_2
9008a9_f1c9c628de474309b2e38ae42c4cc14b-mv2_d_3024_4032_s_4_2
About Me

My name is TC and I am a middle school girl who recently learned how to code using the device- Jewelbots.  programmable bracelet 

that is a great way to learn how to code using the service Aurduino IDE. I also love to write. I use writing to learn more about myself and who I am. Click here to learn more. 

 

-TC 

 

Search by Tags
bottom of page