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
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
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
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.