Pinguino + XBee Shield

Pinguino + Arduino XBee Shield
Pin: Pin Allocation: SKXBEE User’s Manual HERE For more information, please visit HERE Example: On/Off LED using computer keyboard Flow Chart:

Program Code:

#define LEDA 7
#define LEDB 8
#define LEDC 9

int caractere;
void setup()
{
pinMode(LEDA,OUTPUT);
pinMode(LEDB,OUTPUT);
pinMode(LEDC,OUTPUT);
Serial.begin(9600);
Serial.printf("Hi I AM PINGUINO");
}

void loop()
{
digitalWrite(LEDA,LOW);
digitalWrite(LEDB,LOW);
digitalWrite(LEDC,LOW);
while(1)
{
if (Serial.available()) 
	{
	 caractere=Serial.read(); 
    Serial.print(caractere); 
    if (caractere=='A') 
    digitalWrite(LEDA,digitalRead(LEDA)^1);
    else if (caractere=='B') 
    digitalWrite(LEDB,digitalRead(LEDB)^1);
    else if (caractere=='C') 
    digitalWrite(LEDC,digitalRead(LEDC)^1); 
	}
}
}

Demonstration:

BUY

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorail

Send Sensor’s Data to ThingSpeak Using Raspberry Pi
Getting Started with Raspberry Pi 4B-1GB Beginner Set
5 Major Upgrades on Raspberry Pi 4 Model B
Height Measurement Using Ultrasonic Sensor and Dot Matrix on Maker UNO
Control ESP32 Mobile Robot Using Android Bluetooth App
Scroll to Top