Introduction: How to Realize a Remot Fire Detection Devices Using Iteaduino Plus
Itead customized IteadOS, an operating system based on Ubuntu for it, which offers operation function of the underlying hardware such as GPIO and SIM900, etc. At Iteaduino Plus platform, one who only knows a little about C and C++ and nothing about Linux system (to be frank, that is me) has no trouble in driving some common electronic modules and using ARM just as Arduino.
With existing resources, we made a small DEMO to show how to make a phone call to the target phone number when the ambient temperature is too high.
Step 1: Parts List
1, Iteaduino Plus
2, ELECTRONICBRICK - TEMPERATURE SENSOR BRICK
3, SIM900 GSM/GPRS MINIMUM SYSTEM MODULE
4,RASPBERRY PI SIM900 GSM/GPRS MODULE ADAPTER KIT
5, GROVE UNIVERSAL 4 PIN CONVERTER CABLE - 20CM
6, ELECTRONIC BRICK - LIGHTING EMITTING DIODE
Step 2: Connection
Connect the parts to Iteaduino Plus with corresponding cables. As LED and temperature sensor adopt standard electronic brick Grove interfaces, and there is a customized Adapter Kit for SIM900 module, connection is quite simple instead of having a bunch of cables in mess.
First, connect RASPBERRY PI SIM900 GSM / GPRS MODULE ADAPTER KIT with SIM900 Module. Adapter Kit is customized for SIM900 module and Raspberry Pi to convert pin header interface on SIM900 module into Raspberry Pi compatible 26pin interface. Iteaduino Plus also provides a Raspberry Pi compatible 26pin interface, so that Raspberry Pi accessories can be used on it. As shown in Figure 2, insert Adapter Kit into SIM900 module according to the red marks and another end of Adapter Kit should be connected with Iteaduino Plus.
Then connect the temperature sensor and LED indicator to Iteaduino Plus via Grove interface as shown in figure 3. Please note that the temperature sensor should be connected to P17 and LED indicator to P18.
At this point, we have had the parts connected. It is quite simple, isn’t it?
Step 3: Coding
Itead has provided a lot of useful library functions, so that users can easily call these library functions to drive the underlying hardware. For example, SIM900, LED and temperature sensors, etc. used in this DEMO can all be driven by calling the library functions. Just think about it, we only need to call a few simple functions to drive the hardware without having to read <Linux Device Drivers 3rd Edition> and <Understanding the Linux Kernel, 3rd Edition> published by O'REILLY. How fantastic it is!
The code for the whole program is as follows:
#define tempsensor 17
#define ledgreen 18
gsm.TurnOn(9600); //module power on
gsm.InitParam(PARAM_SET_1);//configure the module
ioSetup(); //Setup temperature sensor and LED work mode
if(Current_temperature ==1) //Temperature is higher than expected
printf("ATTENTION:Temperature is too HIGH\n");
else //Temperature is Normal.
printf("SAFE, Current Temperature is OK\n");
Use iteadcompilecpp test gsm_test.cpp in the terminal to compile. After compiling, it becomes an executable file.
Step 4: Demo
This is the video to show how it is running.
As we can see, Iteaduino Plus is also equipped with basic smart home features. It can detect ambient temperature constantly, and when the ambient temperature exceeds the set value, it can send a message to inform the owner that it is too hot in the house and it may cause a fire, so that the owner can take effective measures. The temperature sensor can be replaced with a variety of other sensors, such as proximity sensor, ambient light sensor, etc. to function as an anti-theft warning. Furthermore, Iteaduino Plus can also work as the master control in smart home to control various appliances in the house.