Académique Documents
Professionnel Documents
Culture Documents
Platform
Bob Clough
@thinkl33t
thinkl33t.co.uk
Me
In Real Life
Software Developer
Sysadmin
In my 'Free' time
Maker
HACMan Organiser
Roboticist
Auto login
Auto Login
Edit /bin/autologin.sh
#!/bin/bash
/bin/loginfroot
Auto Login
Edit /etc/inittab
Find the line: (it should be line 54)
1:2345:respawn:/sbin/getty115200tty1
Change it to:
1:2345:respawn:/sbin/gettynl\
/bin/autologin.sh115200tty1
Woohoo!
Edit /root/.bashrc
if[[$(tty)=='/dev/tty1']];then
/root/operation/op.py
endif
What?
Seriously, thats it
Install pyserial
sudoaptgetinstallpythonserial
Within python
importserial
ser=serial.Serial("/dev/ttyACM0",9600)
while1:
line=ser.readline().strip()
print(line)
http://www.youtube.com/watch?v=j5s-SlHvb_c
17 GPIO
SPI
I2C
GPIO Pins
3.3V
2mA 16mA per pin
maximum
Completely
unprotected!
GPIO Pins
Hardware
Slice of Pi from
Ciseco
Devboard for Pi,
prototype area
GPIO Pins
>wget
http://pypi.python.org/packages/source/R/
RPi.GPIO/RPi.GPIO0.1.0.tar.gz
>tarzxfRPi.GPIO0.1.0.tar.gz
>cdRPi.GPIO0.1.0
>sudopythonsetup.pyinstalla
GPIO Pins
importRPi.GPIOasGPIO
GPIO.setup(18,GPIO.OUT)
GPIO.setup(11,GPIO.IN)
while1:
ifGPIO.input(11):
GPIO.output(18,False)
else:
GPIO.output(18,True)
Yaaaaay!