to further experiment with ANN, I made 2 hidden layer ANN with 4 inputs. The hidden layer neurons have only 2 inputs each, which makes it a bit strange, but this is to further implement with ATITYNY85.
To train/test the ANN, I made a glove with 4 bend/pressure sensor. it is placed on the joints of the index, middle, ring finger and one on the palm. The glove is made with stretch material, but as I made it to fit my hand (which is rather small). It came out tighter than I thought, which is good for getting good data. Tt looks like it can only fit me and no other person, though..
Each connection point is then connected to a cable, breadboard and Arduino. The sensors measure something like 20k-150k, so I made 100k ohm voltage divider on the breadboard. the reading looks pretty good.
Arduino code for monitoring with plotter >> https://github.com/mikst/A.I.F.L./tree/master/arduino/AnalogReadSerial_4inputs
Arduino code to print out the gesture sensor data to be used as training data >> https://github.com/mikst/A.I.F.L./tree/master/arduino/AnalogReadSerial_recorder
Then I made a little Arduino sketch to grab data from hand gestures to create training/test data. Then this was fed into the Python ANN to see if it can learn the gestures. It looks like with 2 gestures (1 and 0) it works quite well. If I add third one as (0.5), it does not work at all. For 3 gesture recognition, I probably need 3 output layers.
Python code tried out with this data >>https://github.com/mikst/A.I.F.L./blob/master/python/nn_4input_2in_6hidden.py
data from the glove>> https://github.com/mikst/A.I.F.L./blob/master/python/glove_dataset.txt