P&O Session 2
Upcoming SlideShare
Loading in...5
×
 

P&O Session 2

on

  • 558 views

Probleemoplossen en Ontwerpen slides.

Probleemoplossen en Ontwerpen slides.

Course at KU Leuven 2nd year engineering science students

Statistics

Views

Total Views
558
Views on SlideShare
558
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    P&O Session 2 P&O Session 2 Presentation Transcript

    • PenO3 Sessie 2 Erik Duval Sven Charleer - Jose Luis Santos - Nick Vannieuwenhoven
    • 14.00: Arduino to Pi 14.20: Hands-on 15.40: Break 16.40: More hands-on 18.00: Done
    • Blogs: source code! Wiki: Backlog and team members!
    • Previous session Raspberry Pi ArduinoSensor LEDa a
    • Today Raspberry Pi ArduinoSensor LEDa a 6
    • Hook up sensors to Arduino (test on pc)
    • Plug Arduino into Pi (hub) Hook up sensors to Arduino (test on pc)
    • Plug Arduino into Pi (hub) Boot Pi Hook up sensors to Arduino (test on pc)
    • /dev/serial/by-id/usb-Gravitech_ARDUINO_NANO_13BP1184-if00-port0 Devices on Linux
    • /dev/serial/by-id/usb-Gravitech_ARDUINO_NANO_13BP1184-if00-port0 Devices on Linux
    • /dev/serial/by-id/usb-Gravitech_ARDUINO_NANO_13BP1184-if00-port0 Devices on Linux
    • /dev/serial/by-id/usb-Gravitech_ARDUINO_NANO_13BP1184-if00-port0 sudo ln -s /dev/arduino Devices on Linux
    • /dev/serial/by-id/usb-Gravitech_ARDUINO_NANO_13BP1184-if00-port0 Python & Arduino
    • https://pypi.python.org/pypi/pyserial Python & Arduino
    • https://pypi.python.org/pypi/pyserial Python & Arduino sudo python setup.py install TAR -XF
    • import  serial arduino  =  serial.Serial('/dev/arduino',  9600) while  True:          value  =  arduino.readline()          print(value) Python & Arduino
    • Excercise
    • #define  PHOTOSENSE_ANA_PIN  A0     void  setup()  {      //a  comment  in  the  setup  section  which  is  run  once      Serial.begin(9600); } void  loop()  {      int  microphoneValue  =  analogRead(PHOTOSENSE_ANA_PIN);      Serial.print("Sensor  Value:  ");      Serial.println(microphoneValue);      delay(1000);       } import  serial arduino  =  serial.Serial('/dev/arduino',  9600) while  True:          value  =  arduino.readline()          print(value)
    • Let’s go to the wiki