Open frivas12 opened 5 years ago
To get the motor moving, create a new python file yardbot.py.
import pigpio import time
print("Start") pi = pigpio.pi() # pi1 accesses the local Pi's gpios
pi.set_mode(17,pigpio.OUTPUT) pi.set_mode(22,pigpio.OUTPUT)
pi.write(17,1); pi.write(22,0); time.sleep(5) pi.write(17,0); pi.write(22,1); time.sleep(5) pi.write(17,0); pi.write(22,0);
print("End")
Didn’t have a cable to connect keyboard and mouse so I used this to connect using ssh
Installed remote desktop sudo apt-get install tightvncserver sudo apt-get install xrdp
Install pigpio library: rm pigpio.zip sudo rm -rf PIGPIO wget abyz.me.uk/rpi/pigpio/pigpio.zip unzip pigpio.zip cd PIGPIO make sudo make install To check the library: sudo ./x_pigpio # check C I/F
sudo pigpiod # start daemon
./x_pigpiod_if2 # check C I/F to daemon ./x_pigpio.py # check Python I/F to daemon ./x_pigs # check pigs I/F to daemon ./x_pipe # check pipe I/F to daemon
Connections: