樹莓派 0W 狂想曲︰ 木牛流馬《預言》

雖然 GoPiGo 已有新版本 GoPiGo2 ,從規格、軟體、文件初步比較來看大同小異。因為目前手上只有 GoPiGo1 ,且以此為範作個開始 。鑑於硬件組合與軟件安裝, GoPiGo 官網文件十分詳盡,故不再贅述︰

Congratulations on getting a GoPiGo Raspberry Pi Robot Kit! THESE ARE OLD INSTRUCTIONS — please go here for the new one!

These instructions are for GoPiGo1. If you have the GoPiGo2, please go here.

This page and the sub-pages will help walk you through getting it setup and started.  We recommend you go through each page, in the following order:

1. Assemble the GoPiGo Raspberry Pi Robot Kit. (for accessories see below)

2. Setting up the SD Card.

3. Powering Up the GoPiGo.

4. Connect to the GoPiGo.

5. Booting the GoPiGo for the first time.

After you have completed all the steps above, you can check out the Example Projects that we have made and try them out yourself or make something cool and share it with the community.

Assembly Instructions for GoPiGo Accessories

Please find the assembly instructions for each accessory in the links below:

GoPiGo Servo Kit

Raspberry Pi Camera & Ultrasonic Sensor

 

簡言之,灌好樹莓派 Raspbian 系統,git clone https://github.com/DexterInd/GoPiGo.git

Python Library

[See our guided tutorials on getting started with Python and the GoPiGo here.] (http://www.dexterindustries.com/GoPiGo/programming/python-programming-for-the-raspberry-pi-gopigo/)

Video Playlist on Getting Started with the GoPiGo and Python

This repository contains the Python library for the GoPiGo, tests programs, projects and Examples

Files:

  • gopigo.py : Main Python library to control the GoPiGo
  • basic_test_all.py : Example to test all the functions of the GoPiGO
  • setup.py : Installation file for the GoPiGo (use only if you are not using Dexter Industries SD Card)

Folders:

  • Examples : Example programs and projects for the GoPiGo
  • tests : Test program for testing the individual subsystems of the GoPiGo
  • other_scripts: Smaller programs to check multiple sub-system functionality

 GoPiGo

This repository contains source code, firmware and design materials for the GoPiGo.

 GoPiGo

 

然後 cd /GoPiGo/Setup , sudo ./install.sh 就行。

如果讀者先知

#!/usr/bin/env python
from __future__ import print_function
from __future__ import division
# the above lines are meant for Python3 compatibility.
# they force the use of Python3 functionality for print()
# and the integer division
# mind your parentheses!
 
########################################################################
# This library is used for communicating with the GoPiGo.
# http://www.dexterindustries.com/GoPiGo/
# History
# ————————————————
# Author Date Comments
# Karan 30 March 14 Initial Authoring
# 02 July 14 Removed bugs and some features added (v0.9)
# 26 Aug 14 Code commenting and cleanup
# 07 June 16 DHT example added
”’
## License
GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.txt>.
”’
#
########################################################################
 
import sys
import time
import math
import struct
import subprocess
 
WHEEL_RAD=3.25
WHEEL_CIRC=2*math.pi*WHEEL_RAD
PPR = 18 # encoder Pulses Per Revolution
 
if sys.platform == uwp:
import winrt_smbus as smbus
bus = smbus.SMBus(1)
else:
import RPi.GPIO as GPIO
import smbus
 
# for RPI version 1, use “bus = smbus.SMBus(0)”
rev = GPIO.RPI_REVISION
if rev == 2 or rev == 3:
bus = smbus.SMBus(1)
else:
bus = smbus.SMBus(0)

 

是『小汽車』控制的『核心程式庫』,或想複習『 I2C 』乎?

假使預知『小汽車』行動,一如『小海龜』繪圖,是否很快樂耶☆

L4K ︰ Logo 神龜之故鄉!!

L4K ︰ Python Turtle 《一》

L4K ︰ 通往 Python 的道路