Git Product home page Git Product logo

edukit3-rc-keyboard's Introduction

Please consider these instructions a BETA until they are absorbed and reformatted into the EduKit 3 worksheets.

Remote control for CamJam EduKit 3 using SSH and a keyboard

What you’ll need:

  • An extra computer with SSH capabilities (see https://www.raspberrypi.org/documentation/remote-access/ssh/ for SSH options for all different kinds of platforms)
  • Some way, on the computer, to issue keystrokes (i.e. a keyboard or a touchscreen with a virtual keyboard)
  • A wi-fi dongle for the Raspberry Pi.
  • Some way of determining your Pi’s IP address (see below).

Wi-Fi

What we will do is to use a modified EduKit script that will read in keystrokes and convert them into commands to drive the motors.

First of all, boot up your Raspberry Pi to desktop mode. Then, follow these instructions for connecting to your wi-fi network:

https://www.raspberrypi.org/documentation/configuration/wireless/

Next, you will need some way of determining the IP address of your Pi. If your Pi is plugged into a monitor, this is easy - hover your mouse over the wifi connection icon and make a note of the address (e.g. 192.168.1.69). Alternatively, open up a Terminal session and type ‘ifconfig’ and make a note of the IP address of the wlan0 connection.

Once you are headless (i.e. not connected to a monitor), this IP address might change when you reboot. There are a few ways of determining the IP address of a headless Pi. For example:

  • Login to your wi-fi router and use the in-built functions to see IP addresses of your connected devices.
  • Have the Raspberry Pi email you with the IP address. A script to do this can be found here: https://gist.github.com/binaryghost/4269368 This script can be integrated with your robot script as it is written in Python.

Connect and install

Now that you know your Pi’s IP address, switch to your other computer. Open up your SSH client software and connect to the Pi’s IP address using the username pi and password raspberry.

Next, you’re going to install the software to take in keystrokes and run the motors. Do the following inside the SSH session: git clone https://github.com/recantha/EduKit3-RC-Keyboard

If git reports an error and gives you instructions to set-up a username and name, please follow the instructions given.

Running the script, controlling the robot

Go into that folder: cd EduKit3-RC-Keyboard

Run the script: python rc_keyboard.py

The following keystrokes can be used:

  • W - forward
  • S - backward
  • A - left
  • D - right
  • Q - quit

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.