Hardware Reference
In-Depth Information
Now we will retrieve the data from the flash memory as follows:
if( serial_read == 'T' ) {
while(Serial.available())
{
sb = Serial.read();
serInString[serInIndx] = sb;
serInIndx++;
}
}
int var_serial=serInString[1]-48;
serInIndx=0;
if(var_serial>0 && var_serial <=6)
{
steps=pgm_read_word_near(&mydata[(var_serial-1)][1]);
Serial.println(steps);
}
if(serInString[0]==45){
motorSpeed=20;
for(int i=0;i<steps;i++){
counterclockwise();
}
8x8 matrix control
F We will control the LED matrix using the leter M . A smile is displayed if M1 is
received and a frown if M2 is received:
if(serial_read=='M'){
sb=Serial.read();
if(sb-'0'==1) {
set_display(smile_bmp);
}
else if(sb-'0'==2) {
set_display(frown_bmp);
}
}
BlinkM control
F The BlinkM script is played whenever the leter P is received. The leter P is followed
by the script number.
if( serial_read == 'P' ) {
while(Serial.available())
{
 
Search WWH ::




Custom Search