Code Monkey home page Code Monkey logo

litero's Introduction

LiTeRo

LiTeRo, the (Li)ttle (Te)lepresense (Ro)bot

This python sketch is used in conjunction with phraser.php and litero.html to make a little RasPi-powered rover scoot around and do stuff.

Features included by default (Used GPIO pins also listed):

  • MJPEG Streamer
    • 160-175deg Wide Angle Camera Module with White/IR LED modules For Raspberry Pi (Banggood)
  • RPi.GPIO
    • HG7881 (L9110) Dual Channel Motor Driver (GPIO Pins 17, 18, 22, 27)
    • Navigation LED (2N2222 mod for White/IR LED module) (GPIO Pin 23)
    • Servo control! (Optional, not used by default. Pin 19)
  • eSpeak Text-To-Speech
    • LM4871 audio amp conected to GPIO pin #13 (see: PWM1 on GPIO #13 (ALT0) for RasPi Zero W)
  • MinIMU-9 (I2C x2)
  • ADS1115 ADC (Refer to Adafruit tutorials for setup) (I2C)
  • sSMTP

Basic operation:

theprogram.py reads from a short text file in RAM (/dev/shm/input.txt) at about 60Hz with parameters that are set at will by a PHP script. The PHP script is being called as the client(s) send in new commands (ex: ./phraser.php?ID=546939&CT=1521479887886&M1=90&M2=90). The client in return gets an XML response that this Python program creates in RAM (/dev/shm/output.txt) along with an ongoing live view from the bot using MJPEG-Streamer.

LiTeRo by default will speak its local ip address on bootup. It will also guide you through the magnetic compass calibration when mag_calibration.txt is removed before bootup.

Things to prepare your Raspberry Pi or Raspberry Pi Zero

  • For the Raspberry Pi Zero, you should enable audio out on one of the GPIO pins in order to use TTS (see: PWM1 on GPIO #13 (ALT0) for RasPi Zero W).
  • Make sure Apache, PHP, Python, SSMPT, mjpeg-streamer, eSpeak, and the Adafruit_ADS1x15 Python library are installed for FULL functionality. Other libaries may be present in the top of the python code.
  • In the raspi-config; enable i2c, ssh, remote GPIO, and the camera. (uart is also useful if you want to configure the Pi without removing the SD card.)
  • Make "thecode.py" run on startup. Put the following in /etc/rc.local
#my telepresence bot code
sleep 30s
sudo python /var/www/html/thecode.py &
More information can be found on thestuffwebuild.com
- Michael H.

litero's People

Contributors

physics-dude avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.