PacktPublishing / Learn-Robotics-Programming

Learn Robotics - Fundamentals of Robotics Programming, published by Packt
MIT License
40 stars 14 forks source link

code #6

Open sahaj24 opened 1 year ago

sahaj24 commented 1 year ago

I am writing to seek your guidance on how to upload the final bot code into a Raspberry Pi (RPI) and interface it with a motor shield. Could you kindly provide information on the specific motor shield that you recommend or are currently using, along with the pin connections required for proper operation? Furthermore, if you have any sample videos showcasing the process of uploading code to an RPI and interfacing with a motor shield, I would greatly appreciate it. Thank you for your assistance.

dannystaple commented 1 year ago

Hello, Where you will be able to buy the specific shield recommended by the book depends on where you are living. This is the hat in use: https://vi.aliexpress.com/item/32536369104.html?spm=a2g0o.productlist.main.5.36fc15d3GBEFon&algo_pvid=66592531-7f3d-46ad-a042-b9bf25ee0c7c&algo_exp_id=66592531-7f3d-46ad-a042-b9bf25ee0c7c-2&pdp_npi=3%40dis%21GBP%2130.11%2130.11%21%21%21%21%21%40211bf14716815941243914485d077e%2159054166612%21sea%21UK%21108888535&curPageLogUid=JftL2yTN6NSQ

It has connections for stepper/dc motors, and servo motors, along with through pins for the Raspberry Pi, a slot for the camera cable, and is based around the PCA9865.

As for uploading the code, I recommend headless operation as shown in Chapter 4 (in the second edition book), using scp to send files to the Pi (with scp), and ssh to run terminal commands to launch the code. Use raspi-config to enable ssh, although you should now be able to enable that, along with wi-fi on the Pi during flashing the SD card with the current Raspberry Pi imager product in the settings menu.