Introduction: Bharat Pi IoT Board Setup Instructions and Test Program

About: Bharat Pi is an IoT prototyping platform for students, innovators, startups and developers. A simplified board with an all in one compute network and storage on a single board to build rapid prototypes, colleg…

Bharat Pi is built to enable AI and ML workflows for the next wave of enabling 10 Billions devices world wide.

Compute, network and storage on a single board makes it ready to handle AI and ML workflows with edge data mining and processing capabilities.

Supplies

Usb cable

Bharat Pi boards

Step 1: Download and Install the IDE

Bharat Pi boards can be programmed using open source Arduino IDE programming tool. If you don’t have Arduino IDE installed then you can download a latest version from this location and install based on your system type, if it is Windows or Apple Mac.

Download Arduino IDE: Head over to the official Arduino website https://www.arduino.cc/en/software and download the latest version of the Arduino IDE that's compatible with your operating system.

 the Bharat pi boards uses a USB to serial converter (which allow it to communicate with the host computer),


Step 2: Serial Drivers Check

Before connecting Bharat Pi board ensure that you have serial port drivers installed on your laptop/desktop. 

You can check by connecting the Bharat Pi board to your system and verify if the board is not detected on the respective USB port.

you can check with the device manager in your computer

If the USB port is not detected or if the entire “Port” option looks disabled then you need to install the serial drivers. You can download the serial port drivers from the below location based on the system you are using Windows or Apple Mac.

You can do this by opening the Arduino IDE and got to Tools Menu -> Port option.

If the serial drivers are already installed then the Bharat Pi board would be detected and shown as in below image.

https://wch-ic.com/downloads/CH341SER_ZIP.html

https://wch-ic.com/downloads/CH341SER_MAC_ZIP.html

For Windows extract the zip file and browse the folder when prompted for driver installation upon connecting the board with a Type-C connector.

Note: Apple Mac installer may require you to allow the serial port driver to be run post installation. You will have to go to Mac security and privacy settings and explicitely allow the serial port driver to be run as shown in below image.



Step 3: Arduino IDE Setup

Bharat Pi boards can be programmed using open source Arduino IDE programming tool. If you don’t have Arduino IDE installed then you can download a latest version from this location and install based on your system type, if it is Windows or Apple Mac.

Bharat Pi board requires ESP32 board libraries to be installed. To perform this go to Arduino IDE -> Tools -> Boards -> Boards Manager option. Click on Boards Manager and type “ESP32” in the left side panel search box prompt as show in image.

Install the ESP32 libraries. Once installed you will be able to see ESP32 boards list under Arduino IDE -> Tools -> Boards -> ESP32 as show in below image.

Step 4: Let’s Blink the Onboard LED…

Bharat Pi boards have an onboard LED which is connected to PIN number 2 and can be used as an indicator for any of the programs or applications you will build using Bharat Pi.

To blink the LED let us use a test program readily available within Arduino IDE. Go to menu option File -> Examples -> 01.Basics -> Blink as show in below image.

The Blink led program opens and now let us set the LED PIN number for 2 in the code, this will be the pin number for the Bharat Pi onboard LED. Add a define statement “#define LED_BUILTIN2” just above the “void setup()” line as show in figure

Once the above code change is made then upload the firmware program to the board by clicking on the upload button on the top left side of the Arduino IDE or from the menu Sketch -> Upload option. You can observe the program compiles and the upload progress can also be seen in the output window of the Arduino IDE

Once the program upload completes the board automatically resets and boots. You should now be able to see the onboard LED starts blinking upon every 1 second time interval. You can change the delay time interval in the code and experiment the different time delay and the LED blinking intervals.