14/06/2019
Meeting agenda:
- Control the motor controller on the user end using python code
- Modify the code to make it more versatile (can control fast, slow, etc)
- Modify the code to control motor in a web page and using the keyboard
- Update slides for next Wed presentation
Tasks accomplished:
- Modified the code to control two motors in the car to fulfill above functions
- Learnt how to control the speed of the motors
- Remote accessed the rpi from our own laptops by connecting to the same WiFi
- Updated slides for next Wed
Tony lent us a chassis of a DIY-ed two-wheeled car since the MnT lab has many of these hence Kelvin doesn’t have to buy a new one for us (and we can all save some money!!) 💵💵💵 We also borrowed a motor controller from our friends to try out the codes.
Using the previous code and modifying it, we managed to move and control the motor in the car. Refer to the video below for more details!
We managed to remote access the rpi from our laptops too. ✌🏻✌🏻✌🏻We then tried to modify the code and eventually got to change the directions of the wheel spins (clockwise or anticlockwise) by entering commands on the rpi.
We then hosted the code in a html web page and guess what? We managed to control the motors just by pressing the ‘F’ and ‘B’ keys on our keyboard. When we press F, the wheels will turn clockwise and when we release F, the wheels will stop moving. When we press B, the wheels will turn anticlockwise instead.
All our codes are now stored in the rpi!! It was an eye-opening experience today ehe 👀 It took quite a bit of googling and help from our amazing mentor Kelvin to get the motor working and to connect the pins on the rpi to all the right places.
We also 3D-printed our group identity and we will reveal them in our next post… and it will be some time before we update the blog again as we enjoy our short weekend getaway! Here is a sneak peek though…
Our dearest NS man Reuben is going off for his reservist next week 👨🏻✈️ and is escaping the presentation (joking he worked really hard for the project). See you in one week’s time and enjoy your outfield bye!! 🖐🏻