Introduction: TruckFoodies - a Food Truck Project Using Intel Edison
How many times you have waited in a line/queue in front of a food truck counter? You never knew where your favorite food truck is parked at what time.
The food truck owner also wastes a lot of time waiting for customers. He/she waits for customers at every stop points.
This project is to avoid this waitings and bridge the truck to the customer with the help of Intel Edison and a mobile application. The Intel Edison board with the help of a GPS module , updates the geo coordinates of the food truck to a cloud application in the internet. Currently the connectivity is implemented through wifi tethering .
Tethering is a method by which Intel Edision can connect to your mobile phone and use the phones internet connection.
Food truck owners will hook up a device named "Truck foodies box" to their truck. This will connect the truck to the user through internet.
Step 1: Bill of Materials
This project will need the following :
1. Intel Edison module with Expansion board
2. Grove Kit base shield
3. LED ( Grove Kit) - Indicating the working of Truck Foodies box.
4. GPS module (Grove Kit)
5. Bluetooth Low Energy module (Grove Kit)
6. A Black project box.
Android or iPhone for testing.
Step 2: How to Setup Intel Edison Board
This is a very simple and described in many other instructables and notably in the Intel Edision docuemntations.
The Intel IOT kit will have an Expansion board for Intel Edison module. Edison itself is a tiny module - 1.4 x 1.0 0.15 inches. This will snap to the expansion board's specific slot.
This is the place you should start : https://software.intel.com/en-us/iot/library/edison-getting-started
I would recommend you to register at Intel web site.
I used Intel XDK IOT edition for development. You may chose an Arduino IDE , instead.
Step 3: How to Connect the GPS Module
Luckily I had a Grove starter kit for IoT - Intel Edison . This kit had many modules but NOT GPS. I got the grove GPS module separately. The base shield in the kit was very handy and made the connections of sensors and modules a cake walk.
Connect the GPS module to the UART port in the base shield. You can chose to connect the GPS module directly to the Edison expansion board. But I sued the UART in the base shield.
Step 4: How to Read GPS Data
The GPS readings from the module follow NMEA format. NMEA is National Maritime Electronics Association.
NMEA format sentences can be of 19 types like GPGGA, GPGLL(latitude and longitude),GPGSA, GPGSV,GPRMC, GPVTG etc.
The sentence relevant for us is $GPRMC
A sentence will look like this:
If you parse it as CSV or comma separated values
3rd field shows the validity A=valid ,V=not valid
4th field is the latitude
5th North or South indicator
6th field Logitude
7th field is East or West indicator
8th Speed over ground
10th field is the date ddmmyy format
How to read the GPS data Example code here: https://software.intel.com/en-us/iot/hardware/sensors/grove-gps
Step 5: Bluetooth Low Edition
The BLE helps this solution to recognize the proximity of the customer near the truck. Intel Edison has got built in BLE support . I did not have to strive hard to make it work.
If you are using Intel XDK , you will already have an example BLE application ready run in the sample templates
I followed the below tutorial for setting this up.
Step 6: How Every Thing Works Together
A tiny server application is created using Node.js for listening to GPS coordinates updates from the Truck foodies box.
This server is hosted in the cloud with a text file based data base support. Need to connect to a real data base for scalability. The server has REST interfaces to query the GPS locations of a food truck.
The customer will register in the "Truck foodies" through a mobile application. This app will show the current location of the user ( using the GPS feature of the smart phone) and the near by food trucks. For a food truck to be a part of the system , the owner has to register and hook the Truck Foodies box in the truck. This will connect to the server through the tethered wifi connection and update the coordinates.
The food business owner will get a different set of services through the mobile application.
- Create and Update Menu
- Create schedules
- Send messages to subscribed users
- Process user orders
NB: The complete mobile application development and server side development is beyond the scope of this Instructable. I will try to cover this in a separate Instructable.