Wednesday 24 October 2018

Raspberry Pi - I

In the next post on IOT, we look at Raspberry Pi, a  low cost, credit-card sized computer. We will be using Raspberry Pi 3 for all the work in this post. The hardware specification and other details can be found here. There is a detailed process for setup and installation of OS and how to make it ready for use. We are bypassing all this as these are available on the net. In our case, we are using Raspbian. The aim of this post is to replicate the traffic signal that we have shown in our first post on IOT.

The code in Python is shown below:















The circuit is shown below:







































We can run the above code as shown below on terminal:



We can see that the red and green LEDs light up alternately:






































Another code to achieve the same effect is shown below:















We can run the above code as shown below:



This concludes the post on Raspberry Pi