Sparki goes to college

Hi everyone

So I work in a FE college in BTEC level 2 ICT as a learning assistant and I recently took my Sparki in to give them a taster of programming robotics.

We worked on a simple light following program which the students wrote, debugged and tested themselves also giving ideas about how to improve the program in the future and it worked really well.

Anyway they then had some free time with Sparki and here is an example of one of the codes they had written to turn Sparki into some kind of disco ball:

#include <Sparki.h> // include the sparki library

void setup() {
 sparki.servo(0);
 }
 void loop() {
 sparki.RGB(0,255,0);
 int time=3;
 // make red brighter
 for(int i=0; i<100; i++){
 sparki.RGB(i,0,0);
 delay(time);
 }
 // make red dimmer
 for(int i=100; i>0; i--){
 sparki.RGB(i,0,0);
 delay(time);
 }

// make green brighter
 for(int i=0; i<100; i++){
 sparki.RGB(0,i,0);
 delay(time);
 }
 // make green dimmer
 for(int i=100; i>0; i--){
 sparki.RGB(0,i,0);
 delay(time);
 }

// make blue brighter
 for(int i=0; i<100; i++){
 sparki.RGB(0,0,i);
 delay(time);
 }
 // make blue dimmer
 for(int i=100; i>0; i--){
 sparki.RGB(0,0,i);
 delay(time);
 }}

 

13139307_10208751225754590_8957404330261514653_n

 

Advertisements

2 thoughts on “Sparki goes to college

    • hey, yeah I did its actually in my next post 😉 the lovely people at arcbotics sent me a free new board for the robot and one of the lovely tutors I work with attached it all back up for me 🙂 now my ultra-sonic range finder attaches to the board again and its all working great 🙂 thank you for asking about it 🙂 🙂

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s