P&O3 session 1

77
PenO3 Sessie 1 Erik Duval Sven Charleer - Jose Luis Santos - Nick Vannieuwenhoven

description

Probleemoplossen en Ontwerpen slides. Course at KU Leuven 2nd year engineering science students.

Transcript of P&O3 session 1

Page 1: P&O3 session 1

PenO3Sessie 1

Erik DuvalSven Charleer - Jose Luis Santos - Nick Vannieuwenhoven

Page 2: P&O3 session 1

14.00:PenO3 Quantified Self Quantified Learning14.20: Raspberry Pi14.40: Hands on15.45: Break16.00: Arduino16.20: Hands on18.00: Done

Page 3: P&O3 session 1

PenO

Page 4: P&O3 session 1

eerste keuze?

Page 5: P&O3 session 1

tweede keuze?

Page 6: P&O3 session 1

derde keuze?

Page 7: P&O3 session 1

vierde keuze?

Page 8: P&O3 session 1

vijfde keuze?

Page 9: P&O3 session 1

PenO 1?

Page 10: P&O3 session 1

Probleemoplossen en Ontwerpen

• Ingenieursvaardigheden

• Modelleren en simuleren

• Experimenteren

• Methodische aanpak

• Teamwerk

• Integratie vakken

• Smaakmaker voor andere vakken

Page 11: P&O3 session 1

Over semesters

• gesloten, vak-overschrijdend probleem

• grafisch modelleren, ICT-werktuigen

• gesloten ontwerp

• modelleren en ontwerpen

• open ontwerp

• methodiek, reverse engineering

• ook: samenwerking in groepen

Page 12: P&O3 session 1
Page 13: P&O3 session 1
Page 14: P&O3 session 1

Tools

• Wiki: http://ariadne.cs.kuleuven.be/wiki/

• Wordpress: http://wordpress.com/

• Backlog at the wiki

•One for each group

Page 15: P&O3 session 1

Wiki

• Group Information (You can take a look to Peno3 last year)

• Pointers to your work (blog URL, ...)

Page 16: P&O3 session 1

Session report

• What did you do last session?

• What did you learn?

• How did you do it?

• Main problems?

Page 17: P&O3 session 1

Quantified Self

Page 18: P&O3 session 1

Little Brother

Page 19: P&O3 session 1

http://www.fitbit.com/

Page 20: P&O3 session 1

http://nikeplus.nike.com/plus/

Page 22: P&O3 session 1

http://www.moves-app.com/

Page 24: P&O3 session 1

http://memoto.com/

Page 26: P&O3 session 1

Quantified Learning

Page 27: P&O3 session 1
Page 28: P&O3 session 1
Page 29: P&O3 session 1

http://navi-hci.appspot.com/

Page 30: P&O3 session 1
Page 31: P&O3 session 1

http://mume11.snakeflash.com/

Page 32: P&O3 session 1
Page 33: P&O3 session 1

...-1980s

Page 34: P&O3 session 1

1990s

Page 35: P&O3 session 1
Page 36: P&O3 session 1

http://shop.pimoroni.com/

Page 38: P&O3 session 1

https://vimeo.com/55658574

Page 43: P&O3 session 1
Page 44: P&O3 session 1
Page 45: P&O3 session 1

Pi setup

Page 46: P&O3 session 1

Raspberry Pi Basics

login: pi

password: raspberry

config: sudo raspi-configxwindows: startx

shutdown: sudo shutdown -h now

restart: sudo shutdown -r now

Page 47: P&O3 session 1

GPIO

Page 48: P&O3 session 1

GPIO 3.3V

Page 49: P&O3 session 1

GPIO 3.3V

Page 50: P&O3 session 1

GPIO ProgrammingPython

RPi.GPIO module

import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''''##"Use"board"pin"numbering

Page 51: P&O3 session 1

GPIO ProgrammingPython

RPi.GPIO module

import'RPi.GPIO'as'GPIO'''##"Import"GPIO"libraryGPIO.setmode(GPIO.BCM)''##"Use"board"pin"numbering

Page 52: P&O3 session 1

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

Page 53: P&O3 session 1

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

Page 54: P&O3 session 1
Page 55: P&O3 session 1

Hands-on!

Page 56: P&O3 session 1

Hello World

Page 57: P&O3 session 1

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

Page 58: P&O3 session 1
Page 59: P&O3 session 1
Page 60: P&O3 session 1
Page 61: P&O3 session 1
Page 62: P&O3 session 1

http://www.youtube.com/watch?feature=player_embedded&v=zE5PGeh2K9k

Page 63: P&O3 session 1

http://www.instructables.com/id/Power-Laces-the-Auto-lacing-shoe/

Page 64: P&O3 session 1

http://www.youtube.com/watch?feature=player_embedded&v=ZtNEPkwCfxA

Page 65: P&O3 session 1
Page 66: P&O3 session 1

Arduino Basics

Powered by USB

Data transfer by USB

Digital pins + Analog pins

Page 67: P&O3 session 1

Arduino Programming

Arduino Development Environment

Language based on C

http://arduino.cc/en/Reference/HomePage

Page 68: P&O3 session 1

Arduino Programming

Page 69: P&O3 session 1

Arduino Programming

Python?

Page 70: P&O3 session 1

void'setup()'{}

void'loop()'{'''}

Arduino Programming

Page 71: P&O3 session 1

void'setup()'{'''//a'comment'in'the'setup'section'which'is'run'once''.Serial.begin(9600);}

void'loop()'{'''}

Arduino Programming

Page 72: P&O3 session 1

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

Page 73: P&O3 session 1

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

Page 74: P&O3 session 1

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

Page 75: P&O3 session 1

Sensors

Page 76: P&O3 session 1

Hands-on!

Page 77: P&O3 session 1

#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);'''}