Accessing GPIO and LED Blinking - LED Blinking Program in C for Beaglebone Black board

Описание к видео Accessing GPIO and LED Blinking - LED Blinking Program in C for Beaglebone Black board

In this video tutorial, we are showing how to use GPIO or General Pupose I/O pins of Beaglebone Black Board. You will learn using available GPIO driver in Embedded Linux. We will use LED connected to GPIO and blink LED. We will write C program for LED blinking.

Topics covered in this video tutorial ...
Introduction to Beaglebone Black
GPIO Programming
LED Interfacing
C Program
Build and Run C Program on Beaglebone Black Board


C Program

Include following files using... stdio.h, unistd.h, fcntl.h

#define LOOP 5
int main (void)
{
int i=0,f=0;

// set direction out
f=open("/sys/class/gpio/gpio60/direction",O_RDWR);
write(f,"out",3);
close(f);
f=open("/sys/class/gpio/gpio60/value",O_WRONLY);
// Note - correct i = LOOP, make it i less than or equal to LOOP
for(i=1;i=LOOP;i++)
{
// LED On
write(f,"1",1);
sleep(1);
// LED off;
write(f,"0",1);
sleep(1);
}
close(f);

printf("\nLED Blink Program is terminated !!!");
} // end of main

Other Important videos

Buildroot Tutorial- Linux Kernel on QEMU Virtual board - Booting Linux and Running Linux Application
   • Buildroot Tutorial- Linux Kernel on Q...  

LED Blinking Application for STM32 Board on QEMU
   • LED Blinking for STM32 Board on QEMU  

Run and Debug Embedded Linux Application using GDBServer and GDB
   • Run and Debug Embedded Linux Applicat...  

Building Linux Kernel for QEMU for ARM Board
   • Building Linux Kernel for QEMU for AR...  

Building Linux Kernel, Kernel Modules and Device Tree for Beaglebone Black Board
   • Building Linux Kernel, Kernel Modules...  

Eclipse and GCC Compiler - Configuring Eclipse to use GCC Compiler for QEMU
   • Eclipse and GCC Compiler - Configurin...  


Beaglebone Black Board: Serial Port Interfacing, Connecting Beaglebone Black board with Serial Port
   • Beaglebone Black Board: Serial Port I...  


Embedded Linux - Building Tool chain with Crosstool-NG
   • Embedded Linux - Building Tool chain ...  

Preparing bootable Micro SD card using command line on Linux Host
   • Preparing bootable Micro SD card usin...  


Raspberry PI remote desktop access | Using VNC Viewer on Linux Host to access Raspbian OS Desktop
   • Raspberry PI remote desktop access | ...  


Using QEMU to Emulate Cortex M based board and Running LED Blinking Program
   • Using QEMU to Emulate Cortex M based ...  


Follow us ...
Facebook:   / embeddedcraft  
Twitter:   / embeddedcraft  
Linkedin :   / embeddedcraft-craft-99a47617  

More videos on Embedded System and related topics can be found at:
http://embeddedcraft.org/

Комментарии

Информация по комментариям в разработке