thisismyrobot

Littered with robots and Python code

Driving a DFRobot 3-Wire LED module from a Raspberry Pi


Here's some very simple test code that you can use to drive one of these LED modules from a Raspberry Pi:


(The misspelling was intentional, I figured "Raspbery" looked better than "Raspberr" :D)

Pic: Just need to fill in the missing bits #boxingday #shopping #littlebirdelectronics


Pic: #walle


DNS Twister updated


DNS Twister has been updated to fix a number of small bugs, add a few features (it's significantly faster) and - for the sake of your eyes - there's been the addition of a bit of css .

Go have a play!

Side project time: DNS Twister

Recently I came across a really awesome Python tool called dnstwist . In the author's words, dnstwist is a "Domain name permutation engine for detecting typo squatting, phishing and corporate espionage".

At its core dnstwist creates permutations of domain names and checks to see if they are registered. It also does a ton of other cool things like GeoIP mapping to resolved IP addresses.

As I am sure there are people who would like to use dnstwist but don't have Python installed, I have (after a weekend's re-familiarisation with Google App Engine) created DNS Twister !


It may look rough as **** but it works, presenting the core dnstwist functionality via a web application.

The source code is on GitHub of course.

Docking/charging system overview

As a follow-up to yesterday's post , here's another of my excellent terrible Visio diagrams, showing how the different bits of software will work together on the RPi:

Click to see in all it's glory

The SumoProxy component is effectively complete and the Web Interface component allows viewing the FPV camera but doesn't offer any control. SumoPy and the docking code "work", but not yet in the manner shown.

Sumo-charge update

Thanks to a super-long-weekend my Parrot Jumping Sumo wireless charging project has been making good progress.

The current design has the Raspberry Pi "proxy" the Jumping Sumo, teeing off the data passing between the controller (iPad/phone/etc) and the Sumo.

There is a basic web interface where the user can view the FPV video, and (soon) enable the automated docking sequence. The web interface runs off a flask web server which can parse the video data and will inject controls back into the stream.

I expect I'll switch to web-only control once I've proved the web interface can perform on the Raspberry Pi.

SumoPy and SumoProxy
Two components of this project are available separately via these repositories if you want a play: SumoPy , SumoProxy .

Faster barcode tracking

Leveraging the work done to speed up both video capture and motor control, here's a significantly faster tracking example:


On board it looks like this:



Success!

The first photo taken by properly scraping the video stream .

Capturing Parrot Jumping Sumo video packets in Python's UDPServer

One of the key goals of my sumo-charge project has been to have the Sumo auto-dock by driving towards a "landmark" (a barcode in my case).

To do this I obviously need access to the video stream from the Sumo. The video UDP packets are the same format as the rest of the response data, but for some reason I was not receiving them using Python's UDPServer.

After much flailing around on Google I fired up Wireshark and discovered those packets were being sent still, so it was definitely a problem with my UDP server. Digging deeper (thanks, stack overflow) I discovered that the maximum packet size in UDPServer was hard-coded to less than the size of the video packets.

The size of the video packets sent by the Sumo is established in the reply during the initialisation handshake to TCP port 44444, in the 'arstream_fragment_size' field (65000 in this instance):

To receive the video packets you need to update your UDPServer instance's 'max_packet_size' with the same value: