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); }}
Did you resolve the Ultra sound issue on Sparki? If so how did you do it?
LikeLiked by 1 person
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 🙂 🙂
LikeLiked by 1 person