Embedded Programming and Robotics Lesson 19 Raspberry Pi Programming in C 1.

Slides:



Advertisements
Similar presentations
Technotronics GCECT '091 Decode C This is a C Programming event, where you will be given problems to solve using C only. You will be given a Linux system.
Advertisements

Lecture 2 - Introduction Objective C is used primarily for application development on Apple's Mac OS X and iPhone. On the Apple it is used together with.
Using Java without BlueJ BlueJ projects A BlueJ project is stored in a directory on disk. A BlueJ package is stored in several different files.
Lecture 1 – Arduino Basics
Lab7: Introduction to Arduino
V Avon High School Tech Club Agenda Old Business –Executive Committee –LCCUG meeting volunteer(s) –Reward Points Program New Business –Weekly.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Lesson One: The Beginning Chapter 2: Processing Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from built-in help reference.
A Visual Introduction to PC SAS. Start SAS by double-clicking on the SAS icon...
Embedded Programming and Robotics
Embedded Programming and Robotics Lesson 12 Introducing the Raspberry Pi Intro to Raspberry Pi1.
Embedded Programming and Robotics Lesson 13 Basic Linux 1.
Embedded Programming and Robotics Lesson 17 The OpenCV (Computer Vision) Library The OpenCV Library1.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Raspberry Pi Training Truman College Goals of our Training Today Unbox and boot up the Raspberry Pi (RPi) Learn how to access the desktop graphical.
Raspberry Pi / Linux Workshop Ed Carr Marcus Summers.
EEE305 Microcontroller Systems
Pi In The Sky Chris Stubbs. What’s in the HAB kit Balloon (keep this safe) Parachute PITS kit Raspberry Pi Model A (for flight) + SD + Camera Raspberry.
Raspberry Pi GPIO Pin naming conventions Using sysfs
Setting up the OpenHIM. Components Core - Mediators – e.g. OpenEMPI adapter
Introduction to the Arduino
baltrad node installation for beginners On Ubuntu Jesper Ellerbæk Nielsen Aalborg University, DK.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Development Environments Raspberry Pi ® Saman Amighi 04/2014 ® Raspberry Pi Foundation.
LINUX programming 1. INDEX UNIT-III PPT SLIDES Srl. No. Module as per Session planner Lecture No. PPT Slide No. 1.Problem solving approaches in Unix,Using.
Embedded Programming and Robotics
Open a editor Write/Type the program Save the program with “.c” extension Compile the program (alt + F9) Run/Execute the program (ctrl + F9) Check the.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
Run your first C program.  Bring your computers to class  No prior programming experience is needed  Hours spent  Sakai  TAs.
Executing a C Program Creating the Program Compilation Linking Execution.
”Java and JMLfor Dummies” The Java source code is written in a text file using your favourite editor (Notepad) and is saved with extension.java. Be careful.
Introduction to compilation process March 24. The following slides will show you step by step instruction how to get ready and build C language programs.
CPS120: Introduction to Computer Science Compiling a C++ Program From The Command Line.
Servo Motors Precise angular motion. Servo Motors Raspberry Pi Webcam Interfaces Keeping track of things.
Bonus EV3 Programming Lessons By Droids Robotics LEGO MINDSTORMS and Raspberry Pi Communicator.
Arduino libraries Datatekniker Udvidet hardware/software.
Bonus EV3 Programming Lessons LEGO MINDSTORMS EV3Dev and Raspberry Pi Communicator.
Bonus EV3 Programming Lessons By Droids Robotics LEGO MINDSTORMS and Raspberry Pi IR Light controller.
Bonus EV3 Programming Lessons LEGO MINDSTORMS ev3dev and Raspberry Pi IR Light controller.
Day 12 Intro to Shell Scripting. Doing it all together Up until now, we have only used built in functions in Unix. What if we want to define our own functions?
Cygwin Tutorial 1. What is Cygwin? Cygwin offers a UNIX like environment on top of MS-Windows. Gives the ability to use familiar UNIX tools without losing.
Installing CUDA, PyCUDA on Ubuntu
 Prepared by: Eng. Maryam Adel Abdel-Hady
 Prepared by: Eng. Maryam Adel Abdel-Hady
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
Atmega328p Introduction for Digital and PWM Output Brion L Fuller II Robotics Club.
Embedded Software Design Week II Linux Intro Linux Kernel.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Bash Scripting CIRC Summer School 2016 Baowei Liu CIRC Summer School 2016 Baowei Liu.
Introduction to C Topics Compilation Using the gcc Compiler
Implementation of Embedded OS
Internet of Things (internet of everything?)
CIRC Winter Boot Camp 2017 Baowei Liu
Computer System Laboratory
Embedded Software Development with Python and the Raspberry Pi
Chapter A - The Raspberry Pi Computer
Running your own web server
Get Your Project Started with Arduino
WORKSHOP LED CONTROL.
RASPBERRY PI WORKSHOP.
Building Raspberry Pi Controllers with Python
Introduction to Quantum ESPRESSO and Computer System
Embedded Software Development with Python and the Raspberry Pi
Raspberry Pi – Starting Code at Boot time How to run scripts when you boot up your Pi Pete Januarius Sept 2018.
Cygwin Tutorial 1.
Cygwin Tutorial 1.
Workshop GPIO I2C SPI Panic1 woensdag 10 april 2019.
Video Notes.
Arduino程式範例.
Introduction to Arduino IDE and Software
Presentation transcript:

Embedded Programming and Robotics Lesson 19 Raspberry Pi Programming in C 1

Get the WiringPi Library sudo apt-get install git-core git clone git://git.drogon.net/wiringPi Build the library: cd wiringPi./build Raspberry Pi Programming in C2

Compiling C Programs You can use any text editor, such as leafpad, nano, vi, etc. to create your source file Always give the file a.c (lower case) extension, such as RobotControl.c To compile to an executable, do this: gcc –o RobotControl RobotControl.c The –o option gives the output executable name Raspberry Pi Programming in C3

Compiling C Programs The parameter is the C file name, and the extension is required If you get error messages about libraries not being found, use the sudo ldconfig command to check what default libraries are available Raspberry Pi Programming in C4

Executing Your Program Run the program with./RobotControl If you know about make files and shell scripts you can use them, but they’re beyond the scope of this simple introduction Raspberry Pi Programming in C5

Writing a C Program You’ll need to include the following two things: #include They’re not needed on the Arduino, but you need them for C The gcc compiler really compiles C++ Raspberry Pi Programming in C6

Writing a C Program Initialize the library with the following: wiringPiSetupGpio(); Set GPIO pins: pinMode(LED1, OUTPUT); Raspberry Pi Programming in C7

Writing a C Program Blink an LED: digitalWrite (LED1, HIGH) ; delay (500) ; digitalWrite (LED1, LOW) ; delay (500) ; Raspberry Pi Programming in C8