Showing posts from 2017

Advent of Code

Over the past weeks, I've been working through Advent of Code . If you haven't seen it, it's basically a daily programming challenge - one a day for the 25 days running up to Christmas. Each challenge has two parts, and you get points for being in the first 100 people to submit a correct answer (usually a number, or a short string). There's nothing for coming 101st! The challenges open at 00:00 EST (so, 05:00 GMT) so if you want to have a crack at the leaderboard, it's a very early start. The best I've managed so far is about 162nd, but there's a few days left. Most people tackle the problems in Python, and arguably that's a very good choice. It's a very expressive language, and as the winners produce short, dense code - it needs to be fast to type after all - the lack of static type checking isn't as much of a problem as it might be in a larger application. I'm doing it in Rust, and it's been very educational. I thought my Rust was

Results Analysis

Curious as to how each category did in PiWars (Professional, Intermediate and Beginner), I've annotated the official results with the category of the team and their overall leaderboard position in that category. For example, "2 wheels or not 2 wheels" is "Pro 1", as the winning Professional. You'll note that "Beginners" top four out of the seven categories! Obstacle Course 1 2 wheels or not 2 wheels (Brian Corteil) Pro 1 2 Maxeos (Alex Daily) Inter 4 3 PiSquared (Leo White) Pro 6 4 Team Steve (Jonathan Pallant) Inter 1 5 Team 3.14 Musketeers / Robot B√Ętagnan (Mark Edwards) Beginner 4 6 Hitchin Hackspace (David Booth) Pro 5 7 Slice of Pi Club (Martin Eyre) Inter 6 8 SmartPi (David Plaquin) Beginner 11 9 CNM Hackerspace / Not Today Skynet (Kerry Bruce) Beginner 2 10 Little TREV (Matt Teague) Pro 7 11 Metabot3 (John Palombo / Lance Robson)

It's a win for Steve!

What a weekend. I'm exhausted! At this time we're still waiting on the full results breakdown, but in the Intermediate category, Team Steve managed a 3rd place, a 2nd place and a 1st place (for the Slightly Deranged Golf)! The three placings (plus, I guess, points elsewhere - I don't know yet) were enough to put Steve, the dog/robot at the top of the rankings for the Intermediate category. I wouldn't have believed it was possible looking at the pile of scrap parts I had on my desk at the middle of last week, so the moral is - never give up! Here are some photos from the day: Steve waiting to see the judges. The one and only, Dr Lucy! And a couple of videos, starting with Steve playing golf: The prize bundle I received was pretty epic. Thank you so much to all the sponsors - it really is incredible how generous they've all been. I found (in not particular order): A Pi-DAC+ . This is going to sound awesome in the Jag... A

Yay, driving!

Haven't done this in a while. It feels good! A few brief notes on Steve 2.0: Raspberry Pi Zero W Arduino Pro Mini (4x PWM output/quadrature input/current sensing) Dagu Rover 5 four-motor chassis Dagu speed controller 5V USB 'phone charger' power for the electronics 6xNiMH AA power for the motors CSR Bluetooth USB dongle (the Pi Zero W bluetooth is not reliable for me) PlayStation 3 SIXAXIS remote control Nokia 5110 LCD with speed/current status display and on-board menu function To add - 3x Ultrasonic sensors and 2x IR line sensors.  

Motor test

Humm. Wired up the Arduino but something's not right...

Flashing an AVR from a Raspberry Pi

It seems things have changed a bit since I last worked with an Arduino on a Raspberry Pi - plus I've forgotten a load of stuff. This is a note to myself, more than anything. You can install avrdude with sudo apt install avrdude . On a Raspberry Pi 3 or a Pi Zero W, the /dev/ttyAMA0 UART is used for Bluetooth. The GPIO pins are instead mapped to /dev/ttyS0. The Arduino Pro Mini (5V/16MHz) has an AtMega328P and the bootloader runs at 57,600 bps. You can find the built .hex file in /tmp/build*. The avrdude flash command line is: avrdude -p m328p -c arduino -P /dev/ttyS0 -U ./path/to/file.hex