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!
© Espruino, powered by microcosm.
Report a problem