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("
LED 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- Li...
LED Blinking Application for STM32 Board on QEMU
• LED Blinking for STM32...
Run and Debug Embedded Linux Application using GDBServer and GDB
• Run and Debug Embedded...
Building Linux Kernel for QEMU for ARM Board
• Building Linux Kernel ...
Building Linux Kernel, Kernel Modules and Device Tree for Beaglebone Black Board
• Building Linux Kernel,...
Eclipse and GCC Compiler - Configuring Eclipse to use GCC Compiler for QEMU
• Eclipse and GCC Compil...
Beaglebone Black Board: Serial Port Interfacing, Connecting Beaglebone Black board with Serial Port
• Beaglebone Black Board...
Embedded Linux - Building Tool chain with Crosstool-NG
• Embedded Linux - Build...
Preparing bootable Micro SD card using command line on Linux Host
• Preparing bootable Mic...
Raspberry PI remote desktop access | Using VNC Viewer on Linux Host to access Raspbian OS Desktop
• Raspberry PI remote de...
Using QEMU to Emulate Cortex M based board and Running LED Blinking Program
• Using QEMU to Emulate ...
Follow us ...
Facebook: / embeddedcraft
Twitter: / embeddedcraft
Linkedin : / embeddedcraft-craft-99...
More videos on Embedded System and related topics can be found at:
embeddedcraft.org/
31 июл 2024