MC 3 Arduino 1115
MC 3 Arduino 1115
MC 3 Arduino 1115
com
www.magnetcode.com
Phone: +6012-297 9320 Fax: +603-8948 7451 Email: info@magnetcode.com i
Magnet Code 3.0 for Arduino Interface Users Manual www.magnetcode.com
Disclaimer
Magnet Code software and this workshop note are owned by Bizchip Technology Centre and are
protected by law and international copyright. Therefore, you should treat this workshop note like any
other copyrighted material (e.g. book). The manual and the compiler must not be copied, partially or
as whole without the written consent from Bizchip Technology Centre. The PDF-edition of the
workshop note can be printed for private or local use, but not for distribution. Modifying the manual or
Magnet Code software is strictly prohibited.
License Agreement
By using the Magnet Code software, you agree to the terms of this agreement. Only one person may
use a licensed version of the Magnet Code software at one time.
This manual covers Magnet Code version 3.0 and the related topics. Newer versions may contain
change without prior notice.
Contact Us
Bizchip Technology Centre
Phone: +6012-297 9320 Fax: +603-89487451
Web: www.magnetcode.com Email: info@magnetcode.com
Table of Contents
Chapter 1: Introduction to Magnet Code
1.1 Types of Smartphone Apps 1
1.2 Why use Smartphone? 1
1.3 How to use Smartphone control devices? 1
1.4 The power of fusion 2
1.5 Smartphone VS Microcontroller VS Laptop 3
1.6 Tips to transform old projects with Smartphone 4
1.7 What is Magnet Code? 6
1.8 Magnet Coe interfacing 6
1.9 Smartphone requirement 7
1.10 Magnet Code 3.0 basic features 7
1.11 Magnet Code 3.0 add on toolbox 8
1.12 Steps to get Magnet Code 3.0 9
Smartphone Controller
It can turn on the ceiling, control panel,
desktop...
Examples
Old 2: Fire alarm with SMS notification = Microchip PIC + GSM modem + Siren
New 2: Fire alarm with SMS notification = Microchip PIC + Magnet Code
Old 3: Home security with video recorder = Raspberry Pi + Video Recorder + Siren
New 3: Home security with video recorder = Arduino + Magnet Code
Old 5: Use laptop to control socket on/off = Microchip PIC + PC (Visual Basic)
New 5: Use laptop to control socket on off = Microchip PIC + Magnet Code
Exercise 1
A. Upgrade an existing project with outstanding features in
Smartphone.
Example 1. Attendance system using QR code login.
Example 2. Take photo and Email to owner when an intruder is
detected.
1. __________________________________________________
2. __________________________________________________
Place order at
1 www.bizchip-components.com
Run: Run button is used to connect Magnet Code to device through Bluetooth interfacing.
Stop: Stop button is used to disconnect Magnet Code with the connected device.
Setting: Setting button is used to set graphical user interface for the main page.
About: About button is used to show the About Page. This button will only appear if all
settings in About Page are not empty.
You can scroll up and down to see the setting for all
components.
You can press any item to do the setting for the particular
component.
To exit Setting page and back to the main page, you only
need to press the Back button (at the bottom right of the
phone).
2.4 Background
In the Setting page, press the Background button to enter the Background Setting page.
In the Background Setting page, you can set the background of the main page as color
mode or image mode.
(Refer to point 2.15 for text color and back color setting, point 2.17 for select picture setting.)
Save button: Press Save button to save all settings and back to the Setting page.
Back button: Press Back button to quit the current page and back to the Setting page
without saving anything.
2.5 Button
There are 18 buttons in Magnet Code.
The buttons are arranged into 3 columns and 6 rows.
Row 1 with button A1, B1, C1
Row 2 with button A2, B2, C2
Row 3 with button A3, B3, C3
Row 4 with button A4, B4, C4
Row 5 with button A5, B5, C5
Row 6 with button A6, B6, C6
You can use button for output or input purpose.
You can press any button in the Setting page to access the buttons setting page.
Following shows the setting for the buttons:
Show option: After selecting this option, the button will be shown on the main page.
Hide option: After selecting this option, the button will not be shown on the main page.
Enable Send Data option: After selecting this option, data will be sent once the button is
pressed.
Disable Send Data option: After selecting this option, data will not be sent when the button
is pressed.
Button Text textbox: The content in this textbox will be shown on the button when the
Show option is selected.
Data to Send Out textbox: The content in this textbox will be sent to the connected device
after the button is pressed.
You can also set text size, text color, text font and back color for the button.
(Refer to point 2.15 for text color and back color setting, point 2.16 for text font setting, point
2.18 for text size setting.)
The preview of the button is at the bottom of the page.
Save button: Press Save button to save all settings and back to the Setting page.
Back button: Press Back button to quit the current page and back to the Setting page
without saving anything.
Note:
The width of the button can be set to fixed width or dynamic width. Refer to point 2.9 for
details.
2.7 Email
In the Setting page, press the Email button to enter the Email Setting page. Email Setting
page is used to set Email content you want to send to receivers, e.g. subject, message and
attachment.
Note:
1. You need an Internet connection when you wish to send an Email.
2. Please make sure that your Email account supports software login. You may need to do
some setting in your Email account.
2.8 File
In the Setting page, press the File button to enter the File Setting page.
In the File Setting page, you can do the following things:
Save or Open textbox: If you click the textbox for the 1st time, you can key in the file name
that you wish to save or open. No file name extension is required. If you click the textbox for
the 2nd time, you will see a list of files in the operating folder. You can select any file name
from the list.
Operating Folder textbox: This is the path for the Magnet Code operating folder. All the
files required in your design (e.g. abc.jpg, def.mp3, test.xls) must be stored in this operating
folder. Default operating folder is set to: /storage/emulated/0/mc. You can click the textbox to
set it to any other folders you wish in the internal storage.
Save button: Press the Save button to save all settings and back to the Setting page.
Open button: Press the Open button to open the file name you wish in the Save or the
Open textbox. If the file is valid, Magnet Code will open the file and back to the main page.
Back button: Press the Back button to quit the current page and back to the Setting page
without saving anything.
Reset All button: Press the Reset All button to reset all settings you did earlier.
Note:
1. This feature is only available for Enterprise License.
2. The file you saved is in the xml format. It is saved in the Magnet Code operating folder.
3. Operating Folder only supports folders in the internal storage. External storage is not
supported.
2.9 Layout
In Setting page, press Layout button to enter Layout Setting page.
In Layout Setting page you are able to Lock and Unlock buttons in each row.
Lock option: After this option is selected, all buttons in this row will have a fixed width
when shown in the main page.
Unlock option: After this option is selected, buttons in this row will have a variable width
when shown in the main page. The more buttons in the same row, the thinner is the button.
Save button: Press Save button to save all settings and back to the Setting page.
Back button: Press Back button to quit the current page and back to the Setting page
without saving anything.
2.10 LCD
In Setting page, press LCD button to enter the LCD Setting page.
In LCD Setting page you are able to set the LCD as text mode or image mode.
The height of the LCD in main page is dynamic. The height will be automatically reduced
when more items appear on the main page.
Text Mode option: Under the text mode option, you can key in text you wish to show on
the LCD. The LCD supports multi rows data. You can scroll up and down while editing the
LCD.
You can also set the text alignment, text size, text color, text font and back color for the LCD.
(Refer to point 2.15 for text color and back color setting, point 2.16 for text font setting, point
2.18 for text size setting.)
Image Mode option: Under image mode option, you can select picture you wish to show
on the LCD. (Refer to point 2.17 for select picture setting.)
Slider On or Slider Off option: When Image Mode is selected and slider is On, you can
browse all JPG files in the operating folder through the LCD in the main page.
Save button: Press Save button to save all settings and back to the Setting page.
Back button: Press Back button to quit the current page and back to the Setting page
without saving anything.
2.11 SMS
In Setting page, press the SMS button to enter the SMS Setting page. SMS Setting page
is used to set the SMS content you wish to send to the receivers.
Note:
You need an active SIM card if you wish to send an SMS.
2.13 Title
In the Setting page, press Title button to enter the Title Setting page.
In Title Setting page you can set title of your project in the main page.
You can also set text size, text color, text font and back color for the LCD.
(Refer to point 2.15 for text color and back color setting, point 2.16 for text font setting, point
2.18 for text size setting.)
Note:
Make sure that the text color and the back color are not the same. Else, you will not be able
to see the text.
Exercise 2
Create the following graphical interface for the main page.
Design Design 2 Design 3
Smartphone Computer
+
Arduino UNO
+
+
Magnet Code
Arduino Microcontroller
Start
No
Door open? Off red LED at Pin13
Yes
}
else // door opened
{
digitalWrite(ledPin, LOW); // turn LED off:
void setup()
{
Serial.begin(9600); // set data speed 9600 bps
void loop()
{
// Coding below enable user to run AT-command using software serial
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
Example:
out_vibon\r\n
pho_froman<myphoto>\r\n
aud_plaon<siren>\r\n
lcd_shotex<Hello#How are you?>\r\n
ema_wriatt<photo1.jpg#mydata.xls>\r\n
void setup()
{
Serial.begin(9600); // set data speed at 9600 bps
void loop()
{
Tips:
Use following parameters if
you want to send variables:
%x: hexa output, 00 to FF
%u: unsign integer, 0 to 255
%d: signed integer, -128 to
127
%c: character output: 0-9, A-Z,
a-z
%lu: unsign long integer, 0 to
65535 7451 Email: info@magnetcode.com
Phone: +6012-297 9320 Fax: +603-8948 36
Magnet Code 3.0 for Arduino Interface Users Manual www.magnetcode.com
sprintf(buf,"lcd_bactex<#temp:%d>\r\n",temp);
Serial.print(buf);
void loop()
{
String input = ""; // clear the string every time loop finished
// Get the number of bytes (Strings) available for reading from the serial port
// To receive Strings data, we use while in serial available function
4.2 Project 1: Alert user with vibration and turn on the camera LED
when door is open
Objective: Control phone vibration and camera LED
Start
Yes
Vibrate phone
Turn on the camera LED
Circuit Connection
void setup()
{
pinMode(ledpin,OUTPUT); // define pin13 as digital Output
pinMode(Button, INPUT); // define pin2 as digital Input
Serial.begin(9600);
}
Start
Yes
Circuit connection
void setup()
{
Serial.println("lcd_siztex<120>\r\n"); // set lcd text size to 120
pinMode(ledpin,OUTPUT); // set pin 13 as output
pinMode(Button, INPUT); //set pin 2 as input
Serial.begin(9600); //set data speed 9600 bps
void loop()
{
buttonState=digitalRead(Button); //read digital pin 2
Serial.println("lcd_shodat\r\n"); // Clear content on LCD and show phone date
Serial.println("lcd_bactex<#>\r\n"); //jump to next row
Serial.println("lcd_bactim\r\n"); //show time on lcd
Serial.println("lcd_bactex<#>\r\n"); //jump to next row
// if door is open
if(buttonState == LOW && en==0 ||buttonState == LOW && en==1 )
{
digitalWrite(ledpin,HIGH); // led on
Serial.println("lcd_baccol<-3275001>\r\n"); // lcd background color
Serial.println("lcd_bactex<Open>\r\n"); // lcd show text Open
en=1;
}
delay(500);
}
5.3 Project 3: Visitor counter which shows the total numer of visitors
on the Smartphone
Objective: Show variable on LCD
Start
Door open? No
Yes
Count=Count+1
void loop ()
{
buttonState = digitalRead(Button); // read button state
Start
Tips:
Connect temperature sensor to
Show date, time, and Pin A0.
temperature on LCD
Circuit connection
void setup()
{
Serial.begin(9600); //set data speed =9600
Serial.println("lcd_siztex<50>\r\n"); //set text size to 50pt
Serial.println("lcd_bacdat\r\n"); //clear LCD and show date now on LCD
void loop()
{
int temp = analogRead(tempPin); // read temp sensor at pinA0
temp = temp /2;
Serial.print(buf);
Serial.println("lcd_bactex<#>\r\n"); // add space
Serial.print(buf);
delay(500);
Start
Detect current
temperature
Yes
void setup()
{
Serial.begin(9600); //set data speed 9600 bps
void loop()
{
Int temp = analogRead(tempPin); // read temperature sensor at pin A0
temp = temp /2; // calibrate temp sensor value
//Clear current content on the button and show the new text.
else
{ // Show button
Serial.println ("but_shoon<a1>\r\n");
Serial.println ("but_shoon<c1>\r\n");
Serial.println ("but_shoon<a2>\r\n");
//Clear current content on the button and show the new text.
Serial.println ("but_shotex<a1#<=45C>\r\n");
Serial.println ("but_shotex<c1#>45C>\r\n");
Serial.println ("but_siztex<a2#60>\r\n");
Serial.println ("but_shotex<a2#Danger>\r\n");
Serial.println ("but_baccol<a1#-11937254>\r\n");
Serial.println ("but_baccol<c1#-3275001>\r\n");
delay (500);
Start
No
No
Circuit connection
void setup ()
{
pinMode(13,OUTPUT); //Set pin 13 as output
digitalWrite(13,HIGH); // initialize pin 13 as output high
void loop ()
{
//Get the number of bytes (character) available for reading from the serial port
if(Serial.available() > 0)
{
}
}
Start
//Get the number of bytes (Strings) available for reading from the serial port.
while(Serial.available() > 0)
{
input += (char) Serial.read();// Reads the strings
delay(1000);
else if (input=="REV")
{
digitalWrite (13,LOW); // led1 off
digitalWrite (12,HIGH); // led2 on
Serial.println ("lcd_shotex< REVERSE >\r\n"); // LCD show REVERSE
}
}
Start
No
Set timer to 20sec
Dark?
Stop playing the siren file
Yes
Timer=Timer-1sec
No Timer=0?
Yes
Circuit Connection
Start
Yes LED 1 On
Received 1?
Record 1.mp3 for
4 sec
No
Yes LED 2 ON
Received 2?
Record 2.mp3 for
4 sec
No
Yes
Received 3? LED 3 ON
Play 1.mp3 for
4 sec
No
Yes LED 4 ON
Received 4?
Play 2.mp3 for
4 sec
No
Circuit Connection
Tips:
Connect digital LED to pin13, pin12,pin11,pin10
void loop ()
{
//Get the number of bytes (character) available for reading from the serial port
if(Serial.available() > 0)
{
Start
No
No
No
No
}
}
if(stab==1)
{
int vol = analogRead(volpin)/10.23; // read potentiometer value at pin A0
sprintf(buf,"out_audvol<%d>\r\n",vol); // control smartphone volume
Serial.println(buf);
}
delay (1000);
}
Start
Door open? No
Yes
Count=Count+1
Circuit connection
Tips:
Connect LED to PIN 13.
Connect door switch to Pin 2.
Now we are using pull up resistor
instead of pull down resistor
Recorded audio save in
void setup()
{
Serial.println("lcd_siztex<50>\r\n"); // set lcd text size into 50
pinMode(led,OUTPUT); //initialize pin13 as output
pinMode(Button, INPUT); // initialize pin 2 as input
Serial.begin(9600); // set data speed 9600 bps
}
void loop ()
{
buttonState = digitalRead(Button); // Read digital pin 2
9.2 Project 12: Record and play back video when room door is open
Objective: Record and play video
Start
No
Door open?
Yes
void loop ()
{
buttonState = digitalRead(Button); //buttonState read digital pin 2
2 inp_accy\r\n Read the y axis value of the acceleration sensor and send
to the connected device.
The value is in angle degree unit. It has 8 bytes. Its format
starts with AY, followed by + or -, followed by a 3 digits
number and ends with \r\n.
Example: AY+016\r\n or AY-012\r\n.
Following picture shows the method to change the y axis
value of the acceleration sensor.
3 inp_accz\r\n Read the z axis value of the acceleration sensor and send
to connected device.
The value is in angle degree unit. It has 8 bytes. Its format
starts with AZ, followed by +, a 3 digits number (from 000
to 359) and ends with \r\n.
Example: AZ+016\r\n or AZ+359\r\n.
Following picture shows the method to change z axis value
of the acceleration sensor.
4 inp_reamic\r\n Read the value of the microphone sound volume and send
to the connected device.
The value is in db unit. It has 7 bytes. Its format starts with
LS, followed by a 3 digits number and ends with \r\n.
Example: LS075\r\n or LS092\r\n.
5 inp_reabat\r\n Read the Smartphones battery voltage level and send to
the connected device.
The value is in percent unit. It has 7 bytes. Its format starts
Start
Detect Smartphone
charging status
Power source No
detected? Turn on camera LED
Yes
void loop()
{ Serial.println("inp_reacha\r\n"); // read z-axis value of acceleration sensor
delay(500);
String input = ""; // clear the string
// Get the number of bytes (Strings) available for reading from the serial port
while (Serial.available() > 0)
{
input += (char) Serial.read(); // Read incoming serial data
delay(5); // Delay for 5 ms so the next char has time to be received
delay(500);
}
void setup()
{
Serial.begin(9600); //set data speed 9600 bps
pinMode(13,OUTPUT); // set pin 13 as digital output
void loop()
{
input =""; // clear the string
//Read the z axis value of the acceleration sensor and substitute to String input
Serial.println("inp_accz\r\n");
delay(500);
if(en==1)
{
//data type conversion from character to integer
data1= input[3]-'0';
data2= input[4]-'0';
data3= input[5]-'0';
//value calibration
data1=data1*100;
data2=data2*10;
void setup()
{
Serial.begin(9600); // set data speed 9600 bps
pinMode(13,OUTPUT); // set pin13 as output
void loop()
{
input =""; // clear the string
if(en==1)
{
//Display moving object speed from GPS on phone LCD
sprintf(buf,"lcd_shotex<Speed:#%c%c%c.%c%cKm/h>\r\n",input[2],input[3],input[4],input[6],i
nput[7]);
Serial.println(buf);
//value calibration
data1=data1*100;
data2=data2*10;
Start
Door open? No
Yes
Counter + 1
Show on LCD
Greet visitor
void loop()
{
buttonState=digitalRead(Button); //read digital pin 2
delay(2000);
}
Example:
If phone has 3 unread SMS and 52 read.
sms_fintot<0>: It will send out SA00003\r\n to the
connected device.
sms_fintot<1>: It will send out SA00052\r\n to the
connected device.
sms_fintot<2>: It will send out SA00055\r\n to the
connected device.
7 sms_fintex<sms Find keyword in specified SMS in the phone and send the
ID#keyword>\r\n data to the connected device.
If the keyword is found in the SMS it will send SC1\r\n to
the connected device.
If the keyword is not found in the SMS it will send SC0\r\n
to the connected device.
Example:
sms_fintex<0#Yes>: It will check whether the content of
the last SMS it received has a keyword Yes. It will check
whether the content of the last SMS it received has a
keyword Yes. If Yes is found it will send SC1\r\n to the
connected device, else, it will send SC0\r\n to the
Example:
If sms ID 0 has content Yes, Jack.
sms_reatex<0>: It will send SRYes,Jack\r\n to the
connected device.
If sms ID 9 has content Ok, have a nice day.
sms_reatex<0>: It will send SROk, have a nice day\r\n to
the connected device.
9 sms_reanum<sms ID>\r\n Read the SMS sender number from a particular SMS.
The data has 18 bytes. Its format starts with SN, followed
by the 14 bytes sender phone number in the SMS and
ends with \r\n.
If the sender number is less than 14 bytes, it will replace
the empty bytes by X.
<sms ID>: The sms ID starts from 0. The earlier SMS has
a larger number. The last SMS is always sms ID=0.
Example:
If sms ID 0 sender number is 0123456789.
sms_reanum<0>: It will send out
Example:
If sms ID 0 receive date is on 26-12-2013.
sms_readat<0>: It will send SD26122013\r\n to the
connected device.
If sms ID 5 receive date is on 15-08-2015.
sms_readat<5>: It will send SD15082015\r\n to the
connected device.
11 sms_reatim<sms ID>\r\n Read the SMS receive time from a particular SMS.
The value has 10 bytes. Its format starts with ST,
followed by date in hhmmss and ends with \r\n.
<sms ID>: The sms ID starts from 0. The earlier SMS has
a larger number. The last SMS is always sms ID=0.
Example:
If sms ID 0 received time is on15:42:36.
sms_reatim<0>: It will send ST154236\r\n to the
connected device.
If sms ID 5 receive date is on 08:13:27.
sms_reatim<5>: It will send ST081327\r\n to the
connected device.
12 sms_reasta<sms ID>\r\n Read if the SMS status is read or unread from a particular
SMS.
If the SMS is unread, it will send SB0\r\n to the
connected device.
<sms ID>: The sms ID starts from 0. The earlier SMS has
a larger number. The last SMS is always sms ID=0.
Example:
If sms ID 0 is unread. Upon receiving sms_reasta<0> it
will send SB0\r\n to the connected device.
If sms ID 5 has been read. Upon receiving
sms_reasta<5> it will send SB1\r\n to the connected
device.
Start
Detect room
temperature
No
Temperature
>=45C?
Yes
Serial.println(temp);
delay(1000);
delay(500);
}
Start
Enable SMS
acknowledgement
Detect SMS
acknowledgement
No
Received
SIN?
Yes
Yes On LED
On detected?
(pump on)
No
No
else if (check ==1 && input == "SC1") // if input received SC1 and check =1
{
digitalWrite(13,HIGH); //LED on
}
else if (check ==1 && input == "SC0") // if input received SC0 and check =1
{
check =2;
Serial.println("sms_fintex<0#Off>\r\n"); //find keywordOff in SMS
}
Start
Enable SMS
acknowledgement
Detect temperature
Detect SMS
acknowledgement
No
Received
SIN?
Yes
On LED.
Yes Send
On detected?
feedback.
No
else if (check==1 && input == "SIN")// If input data received SIN and check =1
{
Serial.println("sms_fintex<0#On>\r\n"); //find keyword on on sms
else if (check ==1 && input == "SC0") //if input received SC0 and check =1
{
check =2;
Serial.println("sms_fintex<0#Off>\r\n"); //find sms keyword off
}
Enable SMS
acknowledgement
Detect SMS
acknowledgement
Received No
SIN?
Yes
No
Yes
Off1 Off LED 1
detected?
No
Yes
On2 On LED 2
detected?
No
else if (check==1 && input == "SIN") // if input received dataSIN and check =1
{
Serial.println("sms_fintex<0#On1>\r\n"); // find keywordOn1in SMS
}
else if (check ==1 && input == "SC1") // if input received dataSC1 and check =1
{
digitalWrite(13,HIGH); //led on
else if (check ==1 && input == "SC0") // if input received data SC0 and check =2
Phone: +6012-297 9320 Fax: +603-8948 7451 Email: info@magnetcode.com 115
Magnet Code 3.0 for Arduino Interface Users Manual www.magnetcode.com
{
check =2;
Serial.println("sms_fintex<0#Off1>\r\n");
else if(check==2 && input=="SC1") // if input received data SC1 and check =2
{
digitalWrite(13,LOW); //led off
check=1;
else if(check ==2 &&input=="SC0") // if input received data SC0 and check =2
{
check=3;
Serial.println("sms_fintex<0#On2>\r\n");
else if(check ==3 && input=="SC1") // if input received SC1 and check =3
{
digitalWrite(12,HIGH); //led2 on
check=1;
else if(check==3 && input=="SC0") // if input received data SC0 and check =3
{
check=4;
Serial.println("sms_fintex<0#Off2>\r\n");
}
else if(check ==4 && input == "SC1") // if input received data SC1 and check =4
{
digitalWrite(12,LOW); //led2 off
check=1;
else if(check ==4 && input == "SC0") // if input received data SC0 and check =4
{
check=1;
}
delay(200);
}
Start
Door open? No
Yes
Send Email
void setup()
{
pinMode(13,OUTPUT); //set pin 13 as output
pinMode(buttonPin, INPUT); //set pin 2 as input
Serial.begin(9600); //set data speed 9600 bps
void loop()
{
ButtonState=digitalRead(buttonPin); //read digital pin2
Note:
a. User do not need to type the extension .xls in the file
name.
3 xls_refy<row>\r\n This command will set the row coordinate in the operating
xls file for data saving or reading purpose.
E.g. With an original cursor at A1, the current cursor
coordinate will be set to A3 upon receiving xls_refy<3>.
Start
Tips:
Please refer Project 8 for circuit connection
void setup()
{
Serial.begin(9600); //set data speed 9600 bps
Serial.flush(); // clear serial monitor
}
void loop()
{
ldr=analogRead(A0); // read light sensor at pin A0
ldrpercent= ldr/10.23; // calibrate into percentage
//Get the number of bytes (characters) available for reading from the serial port
if(Serial.available()>0)
{
char data = Serial.read(); // read the character
Serial.println("xls_nexx\r\n");
delay(3000);
}
Objective: Use Smartphone to reduce manpower for daily fish feeding task.
Setup: Install a rail on the fish pond for food dispenser to move forward and
backward. The starting and ending locations of the rail are installed with a magnetic
sensor to stop the food dispenser. Install a Smartphone at the bottom of the food
dispenser to send and receive SMS.
Operation: Whenever any Smartphone received an SMS with the content 1234, it
will send a request to move the food dispenser forward and dispense food while
moving. The food dispenser will stop moving when it is detected by the magnetic
sensor. At the same time it will send Feeding Completed to the user.
Objective: Use Smartphone to capture photo of all vehicles entering or exiting the
palm oil plantation.
Setup: Install a Smartphone near the main entrance to capture photo and Email the
photo to the user. Install an ultrasonic sensor at the main entrance to detect any
object that passes through.
Operation: Whenever an ultrasonic sensor detects an obstacle, the control board will
request the Smartphone to take a photo. The current time and date will be used as the
photo filename. After a photo is taken, it will be sent to the user through Email to alert
him/her.
Objective: Use Smartphone to reduce manpower to control the water level of the
paddy field.
Setup: Install a control board with 2 pumps and 1 ultrasonic sensor. The 1st water
pump is used to pump water into the paddy field. The 2 nd water pump is used to pump
water out of the paddy field. An ultrasonic sensor is used to detect the water level in
the paddy field. Install a Smartphone next to the control board to send and receive
SMS.
Operation: Following shows how the control board responses to SMS received.
Received SMS System Response
Content
LEV Send detected water level to user.
P11 Turn on the 1st pump to pump water into the paddy field.
P10 Turn off the 1st pump.
P21 Turn on the 2nd pump to pump water our of the paddy field.
Objective: Use Smartphone to alert user when power interruption for the air
ventilation system is detected in the chicken farm.
Setup: Connect 240Vac power supply to the control board. Install a Smartphone near
the control board to send SMS.
Operation: Whenever 240Vac power supply is not detected, the control board will
request the Smartphone to play an audio file (e.g. siren) and send an SMS to alert the
user.
Setup: Install a magnetic door switch to detect intruder. Install a Smartphone on the
ceiling of the cowshed to record the inner environment.
Operation: The system has an arm and disarm mode. During an arm mode, the
Smartphone will play an audio file (e.g. siren) if the door is open, and record a 10-
second video to be emailed to the user.
Following shows how the control board responses to SMS received.
Setup: Install a push pull solenoid on the door to lock and unlock the door. Install an
RFID next to the door frame to detect the RFID card. Install a Smartphone on the
ceiling of the baby nursery room to take photo.
Operation: Whenever an RFID card is detected, Smartphone will compare the RFID
card ID with the card ID saved in the database. If a valid card is detected the control
board will request for the Smartphone to take a photo. The current time and date will
be used as the photo filename.
Setup: Include 7 push buttons, control board, battery and a Smartphone in a plastic
casing.
Operation: Patient can press the respective buttons on the casing to present what he
wants.
Button Speech
Button 1 Yes
Button 2 No
Button 3 Toilet
Button 4 Water
Button 5 Eat
Button 6 Hot
Button 7 Cool
Objective: Panel doctor can use this to monitor if his patient walks at least a required
number of steps at home every day.
Setup: Install a limit switch at the bottom of the shoes. Place a Smartphone in the
patients pocket.
Operation: Whenever a patient presses on the limit switch at the bottom of the shoes
(indicate walking), the Microcontroller will up count once. The counter value will be
shown on the Smartphone. When the predetermined steps (e.g. 300) are reached, the
Smartphone will automatically send an SMS to inform his panel doctor.
Objective: Avoid the user from sitting too long on a a wheelchair. Increase blood
circulation to improve patients recovery.
Setup: Install a light dependent resistor in the middle of the wheelchair seat. Place a
Smartphone in the patients pocket.
Operation: Control board will detect room temperature and send the detected
temperature to Smartphone using Bluetooth. The temperature in the 3 rooms will be
displayed on the Smartphone. Every 1 hour the system will record the detected
temperature in the phone. Browse the recorded temperature anytime. If the
temperature in any store room exceeds 450C, the Smartphone will vibrate and play an
audio file (e.g. siren).
Objective: Use Smartphone to protect CPU and monitor screen in the computer lab.
Setup: Attach a limit switch below each CPU or monitor screen. Install a Smartphone
on the ceiling (facing the CPU) for the purpose of taking photo.
Operation: Whenever any CPU or monitor screen is taken away, the limit switch
below the CPU or monitor screen will open. The Smartphone will play an audio file
(e.g. siren), and record a 10-second video to be emailed to the security guard.
Setup: Install a smoke sensor on the ceiling. Install a Smartphone (with SIM card and
credit) in the same room to communicate with the fire alarm.
Operation: Whenever smoke is detected, the Smartphone in the room will send an
SMS to the owner and the fire station with a preset SMS content. At the same time,
the Smartphone will play an audio file (e.g. siren) to alert user in the room.
Objective: Use Smartphone to avoid lost house key cases (esp. by children).
Setup: Install a push pull solenoid on the door to lock and unlock the door. Install a
electric key switch to manually lock and unlock the door. Install a Smartphone near to
the control board to receive an SMS.
Operation: The door lock can be locked and unlocked using an SMS or key. Open
the door using SMS. For example, when the user is not at home, the user can use
SMS to unlock the door for his children who intends to enter the house after tuition
without passing the key to his children. When the user is at home, he can then have
an option to lock or unlock the door using the key instead of through SMS.
Objective: Use Smartphone to avoid intruder from accessing the lecturer's room.
Setup: Install PIR motion sensor in rooms. Install Smartphone on ceiling and focus its
camera on the motion sensor.
Operation: Whenever the PIR motion sensor detects any motion, the Microcontroller
will automatically request the Smartphone to turn on the flash light and take photos.
After a photo is taken, the Smartphone will automatically email the photo to the related
lecturer or security guard. The Email content will include the lecturer room's number
and location.
Setup: Install Smartphone in the helmet. Install 3 super bright LEDs behind the
helmet.
Operation: The acceleration sensor in the Smartphone will continuously monitor head
tilt angle. Whenever head faces down exceeding 20 0, Smartphone will turn on siren
and vibrate to alert the user. At the same time, the 3 super bright LEDs will keep
blinking to alert the driver behind the motorcyclist.
Objective: Use Smartphone to report the latest car coordinate when an intruder is
detected.
Setup: Hide a vibration sensor and a Smartphone under the car seat..
Operation:
The system has an arm and a disarm mode. User can use a key switch to select
either the arm or disarm mode. During an arm mode, the Smartphone will send the
latest GPS coordinate to alert the user if car vibration is detected. User can also send
SMS to the security system to check the latest GPS coordinate of the car.
Objective: Use Smartphone to slow down the car speed when an obstacle is
detected.
Setup: Install an ultrasonic sensor in front of the car. Put a Smartphone at the
deskboard to alert user.
Operation: When no obstacle is detected, the driver can control the car speed
him/herself. If an obstacle is detected within a 3-meter range, the car speed will be
automatically slowed down and Smartphone will turn on the siren and vibrate to alert
the user.
Setup: Install a vibration sensor and a voltage sensor in the traffic light. Install a
Smartphone on top of a nearby lamp post to report the condition of the traffic light.
Setup: Install limit switches on the front and back bumpers. Install Smartphone on the
desk board to detect car coordinate.
Operation: Whenever any limit switch is pressed, the control board will request the
Smartphone to SMS the latest GPS coordinate to the emergency help center.
Home security system which can take intruder photo & Email user
Your Smartphone (RM0) + Magnet Code (RM180) + Photo Toolbox (RM30) + Email Toolbox
(RM100) + Microcontroller & PCB (RM100) + Accessories (RM90) = Total: RM500
NOTE
NOTE
NOTE
NOTE
NOTE