Dancing LED using Raspberry PI and GPIO and Python
Rate this article
0 out of 5
In this tutorial we will show you how Controlling and  interfacing device with the outside world  using gpio and c





#include <stdio.h>
#include <wiringPi.h>
int main(void)
{

int i;

printf("Raspberry Pi blink ");

wiringPisetup();
pinMode (4,OUTPUT);
pinMode (5,OUTPUT);
pinMode (6,OUTPUT);

for(i=0;i<10;i++)
 {
  digitalWrite (4,HIGH);
  delay (500);
  digitalWrite (4,LOW);
  delay (500);
  digitalWrite (5,HIGH);
  delay (500);
  digitalWrite (5,LOW);
  delay (500);
  digitalWrite (6,HIGH);
  delay (500);
  digitalWrite (6,LOW);
  delay (500);
 }
 return 0;
}


source code

   
Messages
Posted:
Post Your Comments
Name (Max 50 Chars)
Comments
   Design  HTML

Copyright © KTS Infotech 2000-2023. Site Developed Using KTS WebCloud
Reach Us on facebookWatch Video Tutorials on YouTube Channel TekTipsNavigate to KTS Technology Blog