Avatar for hopkira

hopkira

Member since Oct 2017 • Last active Oct 2017
  • 1 conversations
  • 3 comments

Robot builder and Doctor Who fan building a real K9.

Most recent activity

    • 3 comments
    • 141 views
  • in Projects
    Avatar for hopkira

    Thanks Gordon, rather embarrassingly I just realised that I used digitalRead rather than analogRead to interface to the ultrasonic sensors, so the neural net was only being trained with 2^5 (i.e. 32) possible values from [0,0,0,0,0] to [1,1,1,1,1]! Later this week I will retrain the net with analogRead data and I suspect it will be much more accurate. The fact it worked at all shows just how powerful neural nets are - and how good Espruino's are for building robots!

    Cheers
    Richard

  • in Projects
    Avatar for hopkira

    I'm in the process of building a robot in the shape of K9 from Doctor Who. I'm keeping everything low cost and Creative Commons so that kids can adapt the code and follow suit should they want, here's what he looks like (inside and out):

    Key to keeping costs down is to use a Raspberry Pi as his central processing unit. To keep him responsive, though, means I need to offload as much sensor processing as I can away from the Pi. Currently I'm working on a 'follow me' capability where he follows a handheld ultrasonic transmitter using five ultrasonic sensors placed around his body.

    Now I could have programmed something myself, but I thought it would be cooler if I created and trained a neural net that executed on an Espruino. This means that just the x,y co-ordinates are transmitted to the Pi, not the sensor data.

    To do this I created an Espruino based ground truth collector that is described in this post.

    The collected data was then used to create and train a feed forward neural net using the Synaptic.JS library in a JSFiddle environment. The library then generated a standalone JavaScript function that would run on the Espruino. That allowed me to do both the sensor collection and neural net execution on a single device as described in this post.

    Yes it even works!

    If you want more, this post describes another experiment with ultrasonics and Fast Fourier Transforms. These experiences have convinced me The Espruino is a brilliant bit of hardware with a wonderful IDE!

    Cheers
    Richard

Actions