Nodebots 2015

Last Saturday was International NodeBots Day and JS Oxford was yet again hosting a hack day. We had a really good turn out with about 30 very enthusiastic people showing up. I belive this was, in no small part, due to the fact we had Gordon Williams, the man behind the Espruino, on hand to help us build some awesome little robot cars made possible by the Expruino Pico and a PCB made especially for the day.

[Tweet no longer available]

I have been looking forward to this event for a long time now. Last year's NodeBot event was one of the main reasons I fell in love with JS Oxford. It was lots of fun and really spurred my interest in microcontrollers (Arduinos, Espruinos, etc.). I may have been a little too keen...

The day started out with an intro from Ryan and Gordon talking about the pre-designed project that was available (or we could make whatever we wanted) and a brief overview of the many components laid out in front of us.

So many components to play with.
So many components to play with.

I started off working with Tom and Katy following the instructions to build a small Espruino Pico car that can be built upon. After shorting out our first board we eventually had something that worked...

[Tweet no longer available]

At this point I decided I wanted to have a go with some of the kit I had brought, specifically one of these I got off eBay. The main difference between this and the small cars we'd been building was the motors on this were considerably hungrier, requiring ~5v to work rather than 3.3v. This posed a problem as the pins on the controllable Espruino Pico all output at 3.3v with the only way to get 5v is the use the constant 5v out pin. After some (repeated) chatting with Gordon I was advised to make use of a transistor to have a controllable switch for the 5v power. I used two of these to have individually controllable wheels and threw together some code that would have the car randomly drive around.


var movement = [0, 0];
var timeout;

setWatch(function(){
  if(timeout){
    clearInterval(timeout);
    timeout = undefined;
    movement = [0,0];
    digitalWrite(A6, movement[0]);
    digitalWrite(A7, movement[1]);
    digitalWrite(B3, 0);
  }else{
    go();
  }
}, BTN, {repeat:1, edge:'rising'});


function getRand() {
  return Math.floor(Math.random() * (1 - 0 + 1)) + 0;
}

function go(){
  digitalWrite(B3, 1);
  timeout = setInterval(function(){
    movement = [getRand(), getRand()];
    digitalWrite(A6, movement[0]);
    digitalWrite(A7, movement[1]);
  },1000);
}

The end result is quite entertaining...

[Tweet no longer available]

All in all it was a very successfull event with many awesome robots being built.

With the day over, a robot uprising in effect and a lot of tired people it was time for some celebratory food and drinks at Joe Perks.