Post on 28-Jan-2015
description
PenO3Sessie 1
Erik DuvalSven Charleer - Jose Luis Santos - Nick Vannieuwenhoven
14.00:PenO3 Quantified Self Quantified Learning14.20: Raspberry Pi14.40: Hands on15.45: Break16.00: Arduino16.20: Hands on18.00: Done
PenO
eerste keuze?
tweede keuze?
derde keuze?
vierde keuze?
vijfde keuze?
PenO 1?
Probleemoplossen en Ontwerpen
• Ingenieursvaardigheden
• Modelleren en simuleren
• Experimenteren
• Methodische aanpak
• Teamwerk
• Integratie vakken
• Smaakmaker voor andere vakken
Over semesters
• gesloten, vak-overschrijdend probleem
• grafisch modelleren, ICT-werktuigen
• gesloten ontwerp
• modelleren en ontwerpen
• open ontwerp
• methodiek, reverse engineering
• ook: samenwerking in groepen
Tools
• Wiki: http://ariadne.cs.kuleuven.be/wiki/
• Wordpress: http://wordpress.com/
• Backlog at the wiki
•One for each group
Wiki
• Group Information (You can take a look to Peno3 last year)
• Pointers to your work (blog URL, ...)
Session report
• What did you do last session?
• What did you learn?
• How did you do it?
• Main problems?
Quantified Self
Little Brother
http://www.withings.com/en/bodyanalyzer
http://quantifiedself.com/2013/02/qs-and-mindfulness/#more-5798
http://www.kickstarter.com/projects/806146824/melon-a-headband-and-mobile-app-to-measure-your-fo
Quantified Learning
...-1980s
1990s
http://www.instructables.com/id/RaspberryPi-Powered-Wearable-Computer/#step1
http://theswitchtolinux.blogspot.com/2012/12/raspberry-pi-daily-deviations-picture.html
http://www.youtube.com/watch?v=5npkz0xY1fo#t=75
http://www.youtube.com/watch?v=5JoARkj7XMA
http://www.youtube.com/watch?v=Nfk1-XMASrk
Pi setup
Raspberry Pi Basics
login: pi
password: raspberry
config: sudo raspi-configxwindows: startx
shutdown: sudo shutdown -h now
restart: sudo shutdown -r now
GPIO
GPIO 3.3V
GPIO 3.3V
GPIO ProgrammingPython
RPi.GPIO module
import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''''##"Use"board"pin"numbering
GPIO ProgrammingPython
RPi.GPIO module
import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''##"Use"board"pin"numbering
GPIO ProgrammingPython
RPi.GPIO module
import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''''##"Use"board"pin"numberingGPIO.setup(7,'GPIO.OUT)'''##"Setup"GPIO"Pin"7"to"OUTGPIO.output(7,True)''"""""##"Turn"on"GPIO"pin"7
GPIO ProgrammingPython
RPi.GPIO module
import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''''##"Use"board"pin"numberingGPIO.setup(7,'GPIO.IN)''''##"Setup"GPIO"Pin"7"to"INresult.='GPIO.input(7)''""##"Read"GPIO"pin"7
Hands-on!
Hello World
import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''##"Use"board"pin"numberingGPIO.setup(7,'GPIO.OUT)'''##"Setup"GPIO"Pin"7"to"OUTGPIO.output(7,True)''"""""##"Turn"on"GPIO"pin"7
import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''##"Use"board"pin"numberingGPIO.setup(7,'GPIO.IN)''''##"Setup"GPIO"Pin"7"to"INresult.='GPIO.input(7)''""##"Read"GPIO"pin"7
http://www.youtube.com/watch?feature=player_embedded&v=zE5PGeh2K9k
http://www.instructables.com/id/Power-Laces-the-Auto-lacing-shoe/
http://www.youtube.com/watch?feature=player_embedded&v=ZtNEPkwCfxA
Arduino Basics
Powered by USB
Data transfer by USB
Digital pins + Analog pins
Arduino Programming
Arduino Development Environment
Language based on C
http://arduino.cc/en/Reference/HomePage
Arduino Programming
Arduino Programming
Python?
void'setup()'{}
void'loop()'{'''}
Arduino Programming
void'setup()'{'''//a'comment'in'the'setup'section'which'is'run'once''.Serial.begin(9600);}
void'loop()'{'''}
Arduino Programming
void'setup()'{'''//a'comment'in'the'setup'section'which'is'run'once'''Serial.begin(9600);}
void'loop()'{'''//a'comment'in'the'loop'section,'which'is'looped'forever'''int'sensorValue'='analogRead(A0);'''if(sensorValue'>'0)'''{'''''''Serial.println(sensorValue);'''}'''delay(1000);'''}
Arduino Programming
void'setup()'{'''//a'comment'in'the'setup'section'which'is'run'once'''Serial.begin(9600);}
void'loop()'{'''//a'comment'in'the'loop'section,'which'is'looped'forever'''int'sensorValue'='analogRead(A0);'''if(sensorValue'>'0)'''{'''''''Serial.println(sensorValue);'''}'''delay(1000);'''}
Arduino Programming
void'setup()'{'''//a'comment'in'the'setup'section'which'is'run'once'''Serial.begin(9600);}
void'loop()'{'''//a'comment'in'the'loop'section,'which'is'looped'forever'''int'sensorValue'='analogRead(A0);'''if(sensorValue'>'0)'''{'''''''Serial.println(sensorValue);'''}'''delay(1000);'''}
Arduino Programming
Sensors
Hands-on!
#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);'''}