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 is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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