Buchempfehlung:
Roboter-Autos mit dem Raspberry Pi

Roboter Autos mit dem Raspberry Pi

Unfortunately, the startup scripts do not work in a way I want them to work. Actual I am working on this problem to solve it. If I had found a solution I will update this chapter with a description how to implement the startup scripts for the Raspberry Pi RC car.

Raspberry Pi - Cardboard Car

Raspberry Pi – Cardboard Car

startup script – live video streaming

 

startup script – WEBIOPi

 

startup script – W-LAN

This section is about the configuration of the WIFI connection. It is important that you buy a wifi stick which is supported by the Raspberry Pi OS.

1. step:

Now plug in the WIFI stick into the USB port and execute the following command:

command:

dmesg

After the execution of the command a few lines of text are displayed. Some lines should look similar to the following lines.

[    3.261105] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[    3.409176] usb 1-1.2: New USB device found, idVendor=148f, idProduct=5370
[    3.424926] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.451001] usb 1-1.2: Product: 802.11 n WLAN
[    3.457011] usb 1-1.2: Manufacturer: Ralink
[    3.471012] usb 1-1.2: SerialNumber: 1.0

This lines show that the WIFI stick was recognized. That is very good.

2. step:

Now execute the following command:

command:

ifconfig

This command shows the hardware address of the WIFI stick and some other information about the stick.

wlan0     Link encap:Ethernet  HWaddr 9c:d1:94:vc:43:f1
UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Important is the line with the hardware address which shows the MAC-address.

3. step:

Now open the following file /etc/network/interfaces. We have to edit this config file. At the end the file should look like this:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

4. step:

The next step is to edit the following file /etc/wpa_supplicant/wpa_supplicant.conf to add the wifi connection or more wifi connections. I am using three different wifi connections in this config file.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid=”Your SID 1
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=”Your Password 1
}

network={
ssid=”Your SID 2
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=”Your Password 2
}
network={
ssid=”Your SID 3
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=”Your Password 3
}

Restart the Raspberry Pi and it should now connect to the wifi available in the order you added the connection information. With this config file it is possible to start a hot spot on your smartphone and the RaPi car will connect to this hot spot automatically.

Contents:


Chapter 1: Raspberry Pi WIFI radio controlled rc vehicle – introduction
Chapter 2: Raspberry Pi WIFI radio controlled rc vehicle – component list
Chapter 3: Raspberry Pi WIFI radio controlled rc vehicle – chassis
Chapter 4: Raspberry Pi WIFI radio controlled rc vehicle – wiring
Chapter 5: Raspberry Pi WIFI radio controlled rc vehicle – software installation
Chapter 6: Raspberry Pi WIFI radio controlled rc vehicle – power supply
Chapter 7: Raspberry Pi WIFI radio controlled rc vehicle – programing
Chapter 8: Raspberry Pi WIFI radio controlled rc vehicle – live video streaming
Chapter 9: Raspberry Pi WIFI radio controlled rc vehicle – web-interface and smartphone
Chapter 10: Raspberry Pi WIFI radio controlled rc vehicle – cooling with passive heat sinks
Chapter 11: Raspberry Pi WIFI radio controlled rc vehicle – startup scripts
Chapter 12: Raspberry Pi WIFI radio controlled rc vehicle – cardboard car model
Chapter 13: Raspberry Pi WIFI radio controlled rc vehicle – power consumption
(Visited 382 times, 1 visits today)