Download - Raspberry Pi Rover + Scratch = IMAOCACH
![Page 1: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/1.jpg)
Raspberry Pi Rover + Scratch
Imaocach
Scratchで動作するRaspberry Pi Rover
![Page 2: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/2.jpg)
Raspberry Pi Rover
![Page 3: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/3.jpg)
![Page 4: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/4.jpg)
![Page 5: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/5.jpg)
![Page 6: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/6.jpg)
![Page 7: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/7.jpg)
![Page 8: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/8.jpg)
Pi VNC Server Scratch
wifi
breadboard
Battery for Pi
Motor gear
Battery for motor
PC Windows,Linux or MacVNC Client
Wifi
Wifi/VNC Prot.
Imaocach system overview
![Page 9: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/9.jpg)
Imaocach Schematic
![Page 10: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/10.jpg)
Screen shot Scratch on Pi
![Page 11: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/11.jpg)
Braodcast pin7lowBraodcast pin11high
![Page 12: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/12.jpg)
Braodcast pin7lowBraodcast pin11high
![Page 13: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/13.jpg)
Pi VNC Server Scratch
wifi
breadboard
Battery for Pi
Motor gear
Battery for motor
AndroidVNC Viewer
Wifi/VNC Prot.
Imoacach system overview for Android
![Page 14: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/14.jpg)
部品表部品名 数量 参考価格 参考購入先など
Raspberry PI Type AWith SD CARD
1 3350 RSコンポーネンツ
Wifi USBドングルWLI-UC-GNM バッファロー
1 758 Www.amazon.co.jp
タミヤ ツインモータギヤーボックス
1 907 www.amazon.co.jp
タミヤ トラック&ホイールセット
1 459 Www.amazon.co.jp
ブレッドボード EIC-301 1 150
電池ボックス 単三X2 SW付
1 60
電池ボックス 単三X4 USBコネクタ付
1 250
フォトカプラ TLP621-1 2 40
トランジスタ 2sc2120 4 10 20個購入時
抵抗 100Ω 2 1 100個購入時
コンデンサー 0.1μF 2 10 20個購入時
ジャンパー線
![Page 15: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/15.jpg)
他社製品とImaocachとの比較LEGO Mindstorms EV3
![Page 16: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/16.jpg)
せっかくなのでもう少しAndroidらしい使い方
そこで加速度センサーを使ってAndroidデバイスをImaocachのリモコンにしてみました
なるべくありもの利用しました。書いたコードは28行
![Page 17: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/17.jpg)
Pi Pythonwifi
breadboard
Battery for Pi
Motor gear
Battery for motor
AndroidsensorUdp
Wifi/UDP
System overview
![Page 18: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/18.jpg)
sensorUDP
このプログラムは、Androidデバイスの各種センサーをCSV形式にてUDPで送信し続けるというものです。
![Page 19: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/19.jpg)
Format
A,シリアルナンバー、時間、加速度センサーX軸、加速度センサーY軸、加速度センサーZ軸となっています。
![Page 20: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/20.jpg)
import RPi.GPIO as GPIOimport socketUDP_IP = ""UDP_PORT = 12345sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)sock.bind((UDP_IP, UDP_PORT))GPIO.setmode(GPIO.BCM)GPIO.setup(4, GPIO.OUT)GPIO.setup(17,GPIO.OUT)GPIO.output(4,False)GPIO.output(17,False)while True: data, addr = sock.recvfrom(1024) l = data.split(",") print l[3] f = float(l[4]) #Y軸 r = float(l[3]) #X軸
if f>1: #両方のモータを駆動 GPIO.output(4,True) GPIO.output(17,True) if r>1: #右のモータのみ駆動 GPIO.output(4,False) if r<-1: #左のモータのみ駆動 GPIO.output(17,False) if f<-1: #両方のモータを停止 GPIO.output(4,False) GPIO.output(17,False)
![Page 21: Raspberry Pi Rover + Scratch = IMAOCACH](https://reader034.vdocument.in/reader034/viewer/2022051411/547bf68d5906b59f798b4665/html5/thumbnails/21.jpg)
まとめと今後の課題
-Raspberry Pi Rover Imaocach-Scratch VNC-Android Device & Python
-Sensor,Camera,Auto drive-Game, Education, Contest