Posts with «python» label

Jetsonbot

Primary image

What does it do?

Avoid obstacles with vision

Hardware overview is in the video with a better description.

Jetson TK1 processes images from the USB webcam and the two Raspberry Pi NoIR cameras then sends commands to the Arduino Mega in order to move autonomously around the environment avoiding obstacles.

The software is custom written and uses OpenCV for image processing.  No ROS, no SLAM, no neural nets or whatever.

Cost to build

Embedded video

Finished project

Number

Time to build

Type

URL to more information

Weight

C64 Keyboard Emulation Over Serial

There’s a lot of reasons you might want to emulate the keyboard on your Commodore 64. The ravages of time and dust may have put the original keyboard out of order, or perhaps you need to type in a long program and don’t fancy pecking away with the less-than-stellar feedback of the standard keys. [podstawek] has come up with the solution: a Commodore 64 keyboard emulator that works over serial.

It’s a simple concept, but one that works well. A Python script accepts incoming keypresses or pre-typed text, then converts them into a 6-bit binary code, which is sent to an Arduino over the serial connection. The Arduino uses the 6-bit code as addresses for an MT8808 crosspoint switch.

MT8808 Functional Diagram from Datasheet

The MT8808 is essentially an 8×8 matrix of controllable switches, which acts as the perfect tool to interface with the C64’s 8×8 keyboard matrix. Hardware wise, this behaves as if someone were actually pressing the keys on the real keyboard. It’s just replacing the original key switches with an electronic version controlled by the Arduino.

[podstawek] already has the setup working on Mac, and it should work on Linux and Windows too. There’s a little more to do yet – modifying the script to allow complex macros and to enable keys to be held – so check out the Github if you want to poke around in the source. Overall it’s a tidy, useful hack to replace the stock keyboard.

The C64 remains a popular platform for hacking — it’s even had a Twitter client since 2009.


Filed under: classic hacks, computer hacks

Raspberry Pi Project

Hey guys,

I'm starting out a project in which I want to build a Raspberry Pi Self Driving Robot. The basic tasks the robot will perform are:

  • Lane tracking using RPi Camera and OpenCV3 + Python
  • Obstacle detection with Ultrasonic sensor + input from RPi Camera(if possible)

The materials I currently plan to use in this project are:

read more

Let's Make Robots 01 Jan 15:42

Raspberry Pi Project

Hey guys,

I'm starting out a project in which I want to build a Raspberry Pi Self Driving Robot. The basic tasks the robot will perform are:

  • Lane tracking using RPi Camera and OpenCV3 + Python
  • Obstacle detection with Ultrasonic sensor + input from RPi Camera(if possible)

The materials I currently plan to use in this project are:

read more

Let's Make Robots 01 Jan 15:42

Raspberry Pi Project

Hey guys,

I'm starting out a project in which I want to build a Raspberry Pi Self Driving Robot. The basic tasks the robot will perform are:

  • Lane tracking using RPi Camera and OpenCV3 + Python
  • Obstacle detection with Ultrasonic sensor + input from RPi Camera(if possible)

The materials I currently plan to use in this project are:

read more

Let's Make Robots 01 Jan 15:42

Raspberry Pi Project

Hey guys,

I'm starting out a project in which I want to build a Raspberry Pi Self Driving Robot. The basic tasks the robot will perform are:

  • Lane tracking using RPi Camera and OpenCV3 + Python
  • Obstacle detection with Ultrasonic sensor + input from RPi Camera(if possible)

The materials I currently plan to use in this project are:

read more

Let's Make Robots 01 Jan 15:42

Pan and Tilt with Dual Controllers

It wasn’t long ago that faced with a controller project, you might shop for something with just the right features and try to minimize the cost. These days, if you are just doing a one-off, it might be just as easy to throw commodity hardware at it. After all, a Raspberry Pi costs less than a nice meal and it is more powerful than a full PC would have been not long ago.

When [Joe Coburn] wanted to make a pan and tilt webcam he didn’t try to find a minimal configuration. He just threw a Raspberry Pi in for interfacing to the Internet and an Arduino in to control two RC servo motors. A zip tie holds the servos together and potentially the web cam, too.

You can see the result in the video below. It is a simple matter to set up the camera with the Pi, send some commands to the Arduino and hook up to the Internet.

The serial protocol for the Arduino is simple: The Pi sends a numeric position followed by a P (for pan) or T (for tilt) at 9600 baud. A web server and some Python handle the interface to the Internet and the human.

We’ve certainly seen our share of similar projects. Some of them have been a bit larger.


Filed under: Arduino Hacks, Raspberry Pi

Monome + Raspberry Pi + Arduino + Python Step Sequencer

Created by “modulogeek,” the MonomePi is a step sequencer that uses a monome as an input controller and a toy glockenspiel as the output instrument.

The brain of the device is a Raspberry Pi 3, which runs a step sequencer program written in Python. Both the monome and an Arduino Uno are connected to the Pi via USB. The Arduino controls eight servos, each attached to a “mallet” made of LEGO bricks taped onto coffee sticks.

As modulogeek explains, the Arduino is programmed to receive serial commands from the Python program. A command is one byte or 8 bits, each bit representing ‘on’ (play the note) and ‘off’ (do nothing) states of each servo.

The monome is entirely controlled by the Python program, which sends serial commands that, for example, tell the monome which buttons need to light up or turn off. It also receives serial data from the monome, like which buttons are getting pressed and depressed.

You can see it below, as well as check out its GitHub page here.

Hackaday Prize Entry: Open Source FFT Spectrum Analyzer

Every machine has its own way of communicating with its operator. Some send status emails, some illuminate, but most of them vibrate and make noise. If it hums happily, that’s usually a good sign, but if it complains loudly, maintenance is overdue. [Ariel Quezada] wants to make sense of machine vibrations and draw conclusions about their overall mechanical condition from them. With his project, a 3-axis Open Source FFT Spectrum Analyzer he is not only entering the Hackaday Prize 2016 but also the highly contested field of acoustic defect recognition.

For the hardware side of the spectrum analyzer, [Ariel] equipped an Arduino Nano with an ADXL335 accelerometer, which is able to pick up vibrations within a frequency range of 0 to 1600 Hz on the X and Y axis. A film container, equipped with a strong magnet for easy installation, serves as an enclosure for the sensor. The firmware [Ariel] wrote is an efficient piece of code that samples the analog signals from the accelerometer in a free running loop at about 5000 Hz. It streams the digitized waveforms to a host computer over the serial port, where they are captured and stored by a Python script for further processing.

From there, another Python script filters the captured waveform, applies a window function, calculates the Fourier transform and plots the spectrum into a graph. With the analyzer up and running, [Ariel] went on testing the device on a large bearing of an arbitrary rotating machine he had access to. A series of tests that involved adding eccentric weights to the rotating shaft shows that the analyzer already makes it possible to discriminate between different grades of imbalance.

The HackadayPrize2016 is Sponsored by:

Filed under: The Hackaday Prize

Machine learning for the maker community

At Arduino Day, I talked about a project I and my collaborators have been working on to bring machine learning to the maker community. Machine learning is a technique for teaching software to recognize patterns using data, e.g. for recognizing spam emails or recommending related products. Our ESP (Example-based Sensor Predictions) software recognizes patterns in real-time sensor data, like gestures made with an accelerometer or sounds recorded by a microphone. The machine learning algorithms that power this pattern recognition are specified in Arduino-like code, while the recording and tuning of example sensor data is done in an interactive graphical interface. We’re working on building up a library of code examples for different applications so that Arduino users can easily apply machine learning to a broad range of problems.

The project is a part of my research at the University of California, Berkeley and is being done in collaboration with Ben Zhang, Audrey Leung, and my advisor Björn Hartmann. We’re building on the Gesture Recognition Toolkit (GRT) and openFrameworks. The software is still rough (and Mac only for now) but we’d welcome your feedback. Installations instructions are on our GitHub project page. Please report issues on GitHub.

Our project is part of a broader wave of projects aimed at helping electronics hobbyists make more sophisticated use of sensors in their interactive projects. Also building on the GRT is ml-lib, a machine learning toolkit for Max and Pure Data. Another project in a similar vein is the Wekinator, which is featured in a free online course on machine learning for musicians and artists. Rebecca Fiebrink, the creator of Wekinator, recently participated in a panel on machine learning in the arts and taught a workshop (with Phoenix Perry) at Resonate ’16. For non-real time applications, many people use scikit-learn, a set of Python tools. There’s also a wide range of related research from the academic community, which we survey on our project wiki.

For a high-level overview, check out this visual introduction to machine learning. For a thorough introduction, there are courses on machine learning from coursera and from udacity, among others. If you’re interested in a more arts- and design-focused approach, check out alt-AI, happening in NYC next month.

If you’d like to start experimenting with machine learning and sensors, an excellent place to get started is the built-in accelerometer and gyroscope on the Arduino or Genuino 101. With our ESP system, you can use these sensors to detect gestures and incorporate them into your interactive projects!