-
1Install PSMove API in order to work with PS Move controller
PSMove can be connected to your Raspberry Pi via unofficial PSMove API:
https://github.com/thp/psmoveapi
It was a bit tricky to install it on the Pi since it has a lot of dependencies.
For this application, Python 3 is necessary so make sure you have that installed first.
Then, follow instructions here:
https://psmoveapi.readthedocs.io/en/latest/build.html#building-on-ubuntu-18-04, also, make sure it generates bindings for Python 3:
https://psmoveapi.readthedocs.io/en/latest/build.html#python-bindings
cmake .. -DPSMOVE_PYTHON_VERSION=3
When you have the bindings working correctly (you can test by running demo apps included in PSMove API), you can proceed with the machine learning portion! -
2Install MXNet on Raspberry Pi
First, you'd need to install MXNet on your raspberry Pi.
Here are the instructions:
https://mxnet.apache.org/get_started?platform=devices&iot=raspberry-pi&
After you have MXNet working, download my repo
https://github.com/msurguy/MYHouse-smart-dollhouse
Try to run the main script by executing
sudo python3 myhouse-gesture-recognition.py
If that works, proceed with the connections of components!
-
3Connections
The connections to the Raspberry Pi pins are as follows:
- 6 = Fan servo
- 4 = Left shutter servo
- 22 = Right shutter servo
- 18 = Neopixel strip that consists of 29 LEDs that are split in two groups for letter M and letter Y
-
4If you want, you can collect and train your own data
We made a data collection script located in https://github.com/msurguy/MYHouse-smart-dollhouse/blob/master/data-collection/collect.py
You can run it by executing
sudo python3 collect.py
When the data is collected, you need to train the network by executing this script: https://github.com/msurguy/MYHouse-smart-dollhouse/blob/master/training/Myhouse-training.py
python3 Myhouse-training.py
Then you can use the resulting network to operate as the brain of your smart doll house!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.