Sixfab NB-IoT is another member of our Nb-IoT Shield family. This can be connected either with USB or you may also use any micro controller(Arduino, Raspberry Pi, Orange Pi etc. ). For this tutorial we are going to use Raspberry Pi. Here we will be sending data obtained by our Raspberry Pi from Ultrasonic Waterproof Range Finder(JSN-SR04T-2.0) and send this data over UDP.

Before you get started make sure you have done your router configuration as mentioned in previous tutorial step 1-10.

Components you will require for this tutorial are:

1. Sixfab NB-IoT EVB.

2. Raspberry Pi

3. Waterproof Ultrasonic Sensor JSN-SR04

4. Jumpers

5. Breadboard

required

 

Steps are as follows

1. Initially we need to do our connections, the circuit configuration is mentioned below.

EVB ↔ Raspberry Pi

5V ↔ 5V

GND ↔ GND

RX ↔ RX(GPIO15)

TX ↔ TX (GPIO14)

JSN-SR04 ↔ Raspberry Pi

5V ↔ 5V

GND ↔ GND

TRIG ↔ GPIO19

ECHO ↔ GPIO26

img_20180421_133156

To know more about pinout of the Sixfab NB-IoT EVB

nb-iot-evb-pinout-594x600

 

2. Clone sixfabNBiotTutorials repo to your Raspberry Pi

 

3. Get into the cloned repo

Here you can observe ultrasonicEVB.py

Find the following line

ip = “XX.XX.XX.XX”

port = “XXXX”

and replace XX.XX.XX.XX with your router’s ip and XXXX with your port number and save it.

 

4. Run the script by typing

Here we are sending data obtained from the ultrasonic sensor over local server.

ultraevb1

 

5. Type following command from another terminal to listen the data being sent over local server.

where 5500 is our port number defined previously. Make sure you type it according to your information

ultraevb2

Hence you are able to observe data from ultrasonic sensor sent over UDP. As mentioned in previous tutorials this tutorial can also be carried out in remote server.

Leave a Reply

Your email address will not be published. Required fields are marked *