Arduino : Introduction & Programming

Transcription

CELEBRATINGRudra Pratap Suman

What is an Arduino ? Open Source electronic prototyping platform based onflexible easy to use hardware and software.

Arduino Family

The Accessories

A Summary of Arduino power

Who is more popular Atmega orArduino?

Bare minimum codevoid setup() {// put your setup code here, to run once:}void loop() {// put your main code here, to run repeatedly:}

Bare minimum code setup : It is called only when the Arduino is powered on orreset. It is used to initialize variables and pin modesloop : The loop functions runs continuously till the deviceis powered off. The main logic of the code goes here.Similar to while (1) for micro-controller programming.

PinMode A pin on arduino can be set as input or output by usingpinMode function. pinMode(13, OUTPUT); // sets pin 13 as output pin pinMode(13, INPUT); // sets pin 13 as input pin

Reading/writing digital values digitalWrite(13, LOW); // Makes the output voltage on pin13 , 0VdigitalWrite(13, HIGH); // Makes the output voltage on pin13 , 5Vint buttonState digitalRead(2); // reads the value of pin2 in buttonState

What are Libraries? Libraries are a collection of code that makes it easy foryou to connect to a sensor, display, module, etc. Forexample, the built-in LiquidCrystal library makes it easyto talk to character LCD displays. There are hundreds ofadditional libraries available on the Internet fordownload.

How to use them?

How to use them?

How to use them?

Arduino dayThink Make Share

Single Board Devices

Single Board Devices Early microcomputers typically consisted of a half dozen(or more) circuit boards--plugged into a backplane--thatimplemented the central processor unit (CPU), memory,disk controllers and serial/parallel port functions. Thesebackplane-based microcomputers were used for dataacquisition, process control and R&D projects, but weregenerally too bulky to be used as embedded systemswithin devices.

BeagleBoneBeagleBoardxMBeagleBoardAM3358ARM Cortex-A8DM3730ARM Cortex-A8OMAP3530ARM Cortex-A8720MHz1GHz720MHzVideomicroHDMI,cape add-onscape add-onsDVI-D (via HDMI DVI-D (via HDMIconnectors), S- connectors), SVideoVideoAudiomicroHDMI,cape add-onscape add-ons3.5mm stereojack3.5mm stereojack4x UART, 8xPWM, LCD,GPMC, MMC1,2x SPI, 2x I2C,A/D Converter,2xCAN Bus, 4Timers4x UART, 8xPWM, LCD,GPMC, MMC1,2x SPI, 2x I2C,A/D Converter,2xCAN Bus, 4Timers, FTDIUSB to Serial,JTAG via USBMcBSP, DSS,I2C, UART, LCD,McSPI, PWM,JTAG, CameraInterfaceMcBSP, DSS,I2C, UART,McSPI, PWM,JTAGBeagle boardFamilyBeagleBoneBlackProcessorAM3358ARM Cortex-A8Maximum1GHzProcessor SpeedSupportedInterfaces

Software Compatibilty Ångström LinuxAndroidUbuntuCloud9 IDE on Node.js w/ BoneScript libraryplus much more

Pandaboard

Pandaboard

Mbed

Any Doubts?

setup : It is called only when the Arduino is powered on or reset. It is used to initialize variables and pin modes loop : The loop functions runs continuously till the device is powered off. The main logic of the code goes here. Similar to while (1) for micro-controller programming.