Download presentation
1
Programming Lab III Assignments
By Prof. G.R.Shinde
2
SPPU Prescription 310254 Programming Laboratory-III
Teaching Scheme: Examination Scheme: Practical: 4 Hrs/Week Practical: 50 Marks Oral: 50 Marks
3
FDP Objectives: To learn basics of Embedded Operating Systems Programming Conceptual understanding of Beagle Bone black (BBB)development board Programming on BBB
4
Assignments Group A (Mandatory)
I. Develop an application using BeagleBone Black/ARM Cortex A5 development board to simulate the operations of LIFT. II. Develop an application using Beeglebone Black/ ARM Cortex A5 development board to simulate the working of signal lights.
5
Assignments Group B Any Six Assignments, All assignments to be covered in the Batch I. Write an application to and demonstrate the change in BeagleBoard/ARM Cortex A5 /Microprocessor /CPU frequency or square wave of programmable frequency. II. Develop a network based application by setting IP address on BeagleBoard/ARM Cortex A5. II. Implement a Parallel Quick Sort algorithm using NVIDIA GPU or equivalent ARM board. III. Implement a Parallel ODD-Even Sort algorithm using GPU or ARM equivalent.
6
Assignment Group C Advance Technology Assignments (Any One) I. Develop Robotics(stepper motor) Application using Beagle Board.
7
Beagle Bone Black(BBB) Development Board
Produced by Texas Instruments in association with DigiKey and Newark element14 The BeagleBone is a development board with a Sitara ARM Cortex-A8 processor The processor clock to 1 GHz, and it adds HDMI and 4 GB of eMMC flash memory RAM 512 MB Supported OS: Linux, Android, Debian, windows Embedded CE, Threadx, QNX
8
Beagle Bone Black(BBB) Development Board contd..
9
Beagle Bone Black(BBB) Development Board Contd..
10
AM3358
11
Expansion Headers The expansion headers on the beagleBone Black are comprised of two 46 pin connectors. P8 and P9 All signals on the expansion headers are 3.3V
12
Expansion Headers and GPIO
13
GPIO Programming The pins on the expansion header have multiple functions You have to identify the pin number which you would like to use as a GPIO Any GPIO you come across would be referenced as GPIOM_N. Identify M,N. Use the formula below to find the corresponding reference number in the kernel: Reference number = M * N
14
GPIO Programming contd..
For example, if you would like to use pin 23 on P8 expansion header Pin 23 is GPIO1_4 Reference number = M * 32 + N Hence, pin 23 would be referenced num RN= 1 *32 + 4 gpio 36 in the kernel.
15
Light up the LED Connect Gnd and VCC to the external board
Gnd: Pin 1,2 of GPIO P Pin 25 VCC: Pin 5 of GPIO p Pin 26
16
Light up the LED contd.. Minicom : interfacing text-based modem control and terminal emulation program Export the pin echo 36 > /sys/class/gpio/export we need to configure it in the output mode. Write the following commands in your terminal echo out > /sys/class/gpio/gpio36/direction Now, let us toggle the LED by typing the following commands in terminal (First one is for turning ON and latter for OFF): echo 1 > /sys/class/gpio/gpio36/value echo 0 > /sys/class/gpio/gpio36/value
17
Assignment 1 Develop an application using BeagleBone Black/ARM Cortex A5 development board to simulate the operations of LIFT
18
Assignment 1 Contd.. Program is written in ‘CPP’
Every GPIO pin is considered as a file Simple file operations used fopen, fread, fwrite, fflush, fclose… Compile the code using g++ The code will execute showing current position of the lift Pressing a button ‘external’ OR ‘internal’ to the lift will take the lift to respective floor Current position will be displayed inside / outside the lift
19
Assignment 1 Contd..
20
Assignment 1:GPIO Pins Configuration
21
Assignment 1 contd..
22
Assignment 2 Develop an application using BeagleBone Black/
ARM Cortex A5 development board to simulate the working of signal lights.
23
Assignment 2 contd.. Program is written in ‘C’
Every GPIO pin is considered as a file Simple file operations used fopen, fread, fwrite, fflush, fclose… Compile the code using gcc The code will execute showing current position of the Traffic allowed e.g. side 2 & 4 with ‘left’ allowed (Green) After the preset time is elapsed ‘Yellow’ will flicker The sides will be changed
24
Assignment 2:GPIO Pins Configuration
25
Assignment 2 contd..
26
Assignment 3 Develop Robotics(stepper motor) Application using Beagle Board.
27
Assignment 3 contd..
28
Assignment 3 contd..
29
Assignment 3:GPIO Pins Configuration
echo 30 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio30/direction echo 60 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio60/direction echo 31 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio31/direction echo 50 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio50/direction
30
Assignment 3 contd.. Program is written in ‘C’
Every GPIO pin is considered as a file Simple file operations used fopen, fread, fwrite, fflush, fclose… Compile the code using gcc The code will execute showing stepper motor revolution in anticlockwise or clockwise direction. Stepper motor executing in full step mode
31
Assignment 3 contd..
32
Thank you for your kind attention !!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.