Here is my presentation to the Raspberry Pi Einführung @ PiAndMore 5 (Trier, 28.06.2014)
RPiEinführung_PiAndMore.pdf (3,4 MB, PDF)
and to the Workshop:
RPiWorkshop_PiAndMore.pdf (2,6 MB, PDF)
IT Systemelektroniker & Master of Science, IT Security, Networks, Embedded Systems, Docker Campus Ambassador and Raspberry Pi Geek
Here is my presentation to the Raspberry Pi Einführung @ PiAndMore 5 (Trier, 28.06.2014)
RPiEinführung_PiAndMore.pdf (3,4 MB, PDF)
and to the Workshop:
RPiWorkshop_PiAndMore.pdf (2,6 MB, PDF)
Here is my presentation to the Where Is My Pi project @ PiAndMore 5 (Trier, 28.06.2014)
wmp_PiAndMore.pdf (0,7 MB, PDF)
The Github project can be found and forked here: https://github.com/nmaas87/whereismypi
https://www.youtube.com/watch?v=cEcIem6R4aQ
1.) Enable SPI
# remove or comment out the spi blacklist line
sudo nano /etc/modprobe.d/raspi-blacklist.conf
2.) Install
a) FBTFT drivers as loadable modules
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
sudo shutdown -r now
OR
b) FBTFT drivers built into the kernel proper
sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update
sudo shutdown -r now
3.) Install the frame buffer driver (as root):
apt-get install xserver-xorg-video-fbdev
4.) Configure frame buffer driver:
sudo vi /usr/share/X11/xorg.conf.d/99-fbdev.conf
Section "Device"
Identifier "myfb"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection
5.) add Autostart:
( the gpios= Pins need to be changed to YOUR specification and connection! )
sudo vi /etc/modules
fbtft_device custom name=tm022hdh26 gpios=reset:25,led:23,dc:24 rotate=90 bgr=1
#on my selfbuild shield
#from usb -> sd card laengs
#fbtft_device custom name=tm022hdh26 gpios=reset:25,led:23,dc:24 rotate=180 bgr=1
#from cinch -> hdmi quer
#fbtft_device custom name=tm022hdh26 gpios=reset:25,led:23,dc:24 rotate=270 bgr=1
6.) add Auto login:
sudo vi /etc/inittab
#1:2345:respawn:/sbin/getty --noclear 38400 tty1
1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1
7.) add Autostart X:
sudo vi /etc/rc.local
su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx &"
8.) Console at boot
Add kernel argument to file /boot/cmdline.txt
fbcon=map:10
Infos taken from:
https://github.com/notro/fbtft/wiki#install
http://marcosgildavid.blogspot.de/2014/02/getting-ili9341-spi-screen-working-on.html
Video was played with this worm-of-a-command-string:
sudo mplayer -nolirc -vo fbdev2:/dev/fb1 -fs -x 320 -y 240 -zoom -framedrop -lavdopts lowres=1:fast:skiploopfilter=all ~/BadApple.avi
As I had to quickly come up with two DS18B20 Sensors for the Raspberry Pi, I decided to built them "quick and dirty" without any breadboard. It is not the most beautiful nor the best way, but it works out quite well. With one exception: It seems like the sensor is too near to the Pi and picks up heat from it :/. Anyway, here are some photos:
That is how it would look like later.
Adding some female header to the base. We need 5 Pins for that. The first pin is going to be connected to 3,3V, the fourth to the GPIO Pin 4 and the fifth to ground. So just cut the pins 2 and 3 from that header.
Add an resistor to pull the Data Pin high to 3,3V. You should use an 4,7k Ohm, but anything between 4,7k - 10k Ohm should work out. I used an 10k Ohm here.
Solder the two pins of the resistor to Pin 1 and Pin 4. Do NOT short with Pin 5!
Add some silver wire to the fifth Pin.
Solder the DS18B20 to the Pins. Watch out for the curved side of the Sensor, it has to face upwards!
I choose to secure the whole sensor against short circuits and stuff with hot glue. Looks ugly, but does the trick.
Last thing is installing the sensor in the left upper corner of the GPIO Pins of your Raspberry Pi.
After booting you have to activate the One Wire protocol like this:
sudo modprobe w1-gpio
sudo modprobe w1-therm
Then you can read your sensor by using this command:
cat /sys/bus/w1/devices/28*/w1_slave
If you want to get your reading nicely formatted, you should install bc with
sudo apt-get install bc
and use this code:
echo "`cat /sys/bus/w1/devices/28*/w1_slave | grep t | cut -d= -f2`/1000" | bc -l | awk '{printf "%.2f \n", $1}'
As a lot of people asked for the OpenWRT / Raspberry Pi Images, I decided to make a new version which replaces the old one from this post ([RaspPi] OpenWRT Trunk with latest Raspberry Pi 3.10.18+ #585 Kernel – as Image download).
That said, the rules haven't changed:
- It is the trunk version of OpenWRT, injected with the latest Raspberry Pi Kernel
- opkg list does contain the current stable package list for the OpenWRT RPi port of the latest stable release and will work out of the box (opkg update, opkg install..) Most packages like apache should work out of the box – but kernel moduls could/will probably fail. I won’t build an package mirror and won’t build packages because of limitied time. Sorry!
- Other than the normal behavior, the RPi does use DHCP to get its IP Adress. To connect for the first time, use nmap to find your RPi in your network. (Then connect via telnet, set an password with passwd and you’re good to use SSH finally!)
- The main partition size has been changed from 48 MB to 64 MB – giving you additional space
You can just download and use the (7zip-ed) image here: rpi_openwrt_2.7z [ 6.1 MB ]
I WON'T BUILD PACKAGES!
This is for the fact that I neither got enough time, nor CPU power at hand.
Sorry :(!
THIS POST IS OUTDATED! A NEW IMAGE HAS BEEN POSTED! PLEASE USE THE SEARCH FUNCTION TO FIND THE LATEST VERSION!
As I found out that the old tutorials weren't helpful and either the OpenWRT Trunk OR the Raspberry Pi Kernel broke the build process (you can still build it successfully, but you won't be able to use the RPi after boot!) - I sat down and found an new way. This time I don't let the kernel build by the OpenWRT enviroment, but insert an healthy and prebuilt one by the RPi Team ;)!
You can just download and use the (7zip-ed) image here: rpi_openwrt.7z [ 6.1 MB ]
There are several changes to the normal version:
- opkg list does contain the current stable package list for the OpenWRT RPi port of the latest stable release and will work out of the box (opkg update, opkg install..) Most packages like apache should work out of the box - but kernel moduls could/will probably fail. I won't build an package mirror and won't build packages because of limitied time. Sorry!
- Other than the normal behavior, the RPi does use DHCP to get its IP Adress. To connect for the first time, use nmap to find your RPi in your network. (Then connect via telnet, set an password with passwd and you're good to use SSH finally!)
- The main partition size has been changed from 48 MB to 64 MB - giving you additional space
All the best,
Nico
You can find my slides from the elektor Live 2013, Raspberry Pi 101 Workshop here: elektor_RPi_2013_Maas.pdf [ 6,1 MB ]
The handout or "cheat-sheet" can be downloaded here: elektor_RPi_2013_Maas_Cheat_Sheet.pdf [ 0,4 MB ]
... and finally, you find the Sourcecode of the Sample Projects here: elektor_RPi_2013_Maas_Sourcecode.zip [ 0,03 MB ]
Videorecording of the talk can be found here
You can find my slides of the elektor Expert Meeting 2013 here: elektor_ER2013_Maas.pdf [1,2 MB]
Also, you can find my presentation to the sun//well (RPi, MSP430 and ATTiny85) project here: http://www.nico-maas.de/wordpress/?p=788 as well as the video to that presentation: http://www.youtube.com/watch?v=MiSZzyuClGU#t=49m10
spidev_test.c for Pingback Testing of RPi spi: spidev_test.c
Test:
Short MISO and MOSI Pin on your RPi, GPIO9 / GPIO10
wget www.nico-maas.de/wordpress/wp-content/uploads/spidev_test.c
gcc spidev_test.c
sudo ./a.out
If you get some different Output than all 0, everything is fine
I just wanted to mention that I got an "Raspberry Pi Basics" Workshop at the elektor Live 2013 in Frankfurt, Hanau (12.10.2013). The first workshop is already fully booked and an second timeslot has been opened. So feel free to come over and let me introduce you to the 101 of the Raspberry Pi.