A repository for RETTL code
- Plug a motor into the A slot on spike prime with a bar attached to its output so it is easier to spin it.
- Plug the color sensor into the D slot on spike prime
- Plug spike prime into your laptop and open a new python project in the LEGO SPIKE app
- Copy the code from robot-agents/feb11.py into the python project and upload the code to spike
- Close the spike prime app
- Download basicserial.py from this repository
pip3 install pyserial
orpip install pyserial
Run python basicserial.py
to see the training and current data. Choose the appropriate USB port when prompted
The bluetooth connection is tricky
- Remove the battery from spike prime
- Open bluetooth settings and delete your spike prime
- Replace the battery in spike prime, turn it on, and touch the bluetooth button
- Re-add and connect with spike prime
- Run
python basicserial.py
to see the training and current data
You make choices by cycling with the right and left button. Then tap the spike prime to select.
- Choose (right left button) the X if you want to use the default training set ** Then the screen will go blank
- Choose the check mark if you want to train
- In training mode you can choose between the chess board (continue training) and the X (finish training)
- To train, set the angle you want on the motor, point the color sensor at the color you want to train with, and then tap spike prime.
- Once you choose X the screen will go blank.