Guide Thymio Raspberry
User Manual:
Open the PDF directly: View PDF .
Page Count: 4
Download | ![]() |
Open PDF In Browser | View PDF |
Guide for Thymio, Raspberry and Python Benjamin Bocquillon June 29, 2018 1 Thymio, Raspberry, and Python This is what you need to follow this manual: • Thymio II with cable • Raspberry Pi 2 • External battery with cable • Empty Micro SD • Dongle WI-FI or Ethernet Cable Figure 1: Requested object 2 Connect Thymio to a computer This wiki page aggregates the configurations needed to use Raspberry 3 to control Thymio II robot. First of all you need to install Raspberry Pi Operating System. You can install NOOBS on the SD card and follow the instructions in order to install Raspbian on the SC card. Remember the default login username and password: username: pi password: raspberry 3 Initial Configuration After that, launch raspberry configuration tool using sudo raspi-config (in case it is the first boot of the OS, the configuration tool will be shown automatically) and make the following configurations: • Expand filesystem 1 • Internationalization Options – Locale en_US.UTF-8 UTF-8 – Time zone: Europe > Amsterdam – Keyboard Layout: choose Generic 105-keys (intl) PC>Other> choose your keyboard language • Advanced Options – Set the desired hostname (testthymio in our case) – Enable SSH server – Disable the login shell accessibility over serial (by other words, select option "No" on the serial menu) • enable the camera Then Reboot Raspberry Pi: sudoreboot 4 SSH and VNC server Configuration On file /etc/ssh/sshd_config make the following changes (using an editor like nano or vim. Do not forget to edit as super user - using sudo): • Uncomment line regarding the use of public keys (AuthorizedKeysFile %h/.ssh/authorized_keys) • Uncomment line regarding GSSAPI Authentication (GSSAPIAuthentication no) in order to remove lag from ssh login • Add "UseDNS no" on the end of the file 4.1 ENABLING VNC SERVER GRAPHICALLY On your Raspberry Pi, boot into the graphical desktop. Select Menu > Preferences > Raspberry Pi Configuration > Interfaces. Ensure VNC is Enabled. 4.2 ENABLING SSH SERVER GRAPHICALLY On your Raspberry Pi, boot into the graphical desktop. Select Menu > Preferences > Raspberry Pi Configuration > Interfaces. Ensure SSH is Enabled. 5 Network Configuration Disable IPv6 To disable, edit a file: sudo nano /etc/sysctl.conf Add the following line: net.ipv6.conf.all.disablei pv6 = 1 For the change to take effect without rebooting: sudo sysctl−p 2 6 Connect Raspberry to eduroam University Network I put this content inside /Etc/wpa/supplicant/wpas upplicant.conf (make sure you update your password and identity) country=GB ctrli nterf ace = DIR = /var/run/wpas upplicantGROU P = netdev updatec onf ig = 1 network= ssid="eduroam" keym gmt = W P A − EAP pairwise=CCMP group=CCMP TKIP eap=PEAP identity="@oslomet.no" domains uf f ixm atch = ”radius.hioa.no” phase2="auth=MSCHAPV2" password=" " I then reloaded the Interface by issuing: wpac li − iwlan0reconf igure 7 Installing Thymio’s control program First of all Update and Upgrade everything present inside the Raspberry: sudoapt − getupdate sudoapt − getupgrade In order to install D-Bus run the following command: sudoapt − getinstalldbus − ∗dev 8 Controlling Thymio II robot At this point, you should be able to control the thymio through raspberry. In order to be able to start D-Bus on raspberry with X11 you have to access the Raspberry with the following command (this works for Linux and Mac OS; on Windows you need to download and install Xming) ssh − Xpi@P IA DDRESS To start aseba in order to communicate with the thymio II you need to run the command: asebamedulla”ser : name = T hymio − II” Transfer the code that you want to run to the Raspberry and run it. The example needs to install also gobject library: sudoapt − getinstallpython − gobject Now you can run the example: pythontest.py 8.1 Control the camera with Python It is also possible control the camera installed on Raspberry with Python. This code takes a picture and saves it in the Raspberry memory: importpicamera 3 camera = picamera.P iCamera() camera.startp review() time.sleep(2) camera.capture(0 image.jpg 0 ) If you press "f" after runs test.py the camera will take a picture. 9 Controlling Thymio II robot from your own laptop After enabling VNC on the Raspberry PI, download VNC viewer from your laptop. Besides, you have to be connected on the same network. After installing VNV viewer, you have to enter the IP adrress of the Raspberry Pi, VNC will ask you the username and the password of the Raspberry. 4
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 4 Page Mode : UseOutlines Author : Title : Subject : Creator : LaTeX with hyperref package Producer : pdfTeX-1.40.17 Create Date : 2018:06:29 00:46:03Z Modify Date : 2018:06:29 00:46:03Z Trapped : False PTEX Fullbanner : This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) kpathsea version 6.2.2EXIF Metadata provided by EXIF.tools