You are on page 1of 60

MAGNETCODE

EN BASRI EFENDI BIN MASRI


SMK TAMAN DESA JAYA
012-7410257
PN PUZIAH BINTI DAEM
SMK SERI ALAM 2
019-7727147
BEKALAN MAGNETCODE
K1

K2
K2
Tayangan

Magnet Code QR Auto Gate.mp4


Magnetcode Mini Robot.mp4
Magnet Code Auto Take Photo.mp4
Magnet Code Fire Alarm.mp4
Magnetcode solaat robot.mp4
Magnet Code Mobile Robot.mp4
RBT Tingkatan 2 ( DSKP )
Magnetcode Workshop
Module 1: Magnetcode Startup

Webpage: www.magnetcode.com
Budaya perisian industri ?
Software industry trend?
Reka bentuk projek bila-bila masa dan dimana
sahaja
Design Project Anytime and Any Place

Kelebihan Magnetcode
Tanpa komputer
No Need Computer
Tanpa pendawaian
Smartphone / Tablet is No Need Wiring Installation
a Mini Computer
Tanpa masalah penyelenggaraan
No maintenance problem

Android 4.1
and above
Your Smartphone + FREE Magnetcode ==>
Create Apps
Magnetcode
App Projects
Your Smartphone + FREE Magnetcode ==>
Create Apps
Carrot Accessories

+ +
Magnetcode
Automation & Robotics
Projects
Magnetcode Accessories

Buzzer LED Relay DC Motor Servo Motor

Temperature Solar Vibrate Magnet SW Limit SW

Smoke Gas Rain Infrared Obstacle


Pembelajaran Kendiri Yang Mudah
Self Learning Friendly
Easy to understand More than 150 Build in command
each command: No examples available: description: No
technical word Types of coding skills. need pdf file or hard
included. Best project template. copy user manual.
Free Ebooks and Project Videos
Download Magnetcode FREE Ebooks:
www.magnetcode.com

Magnetcode Projects:
www.youtube.com
(search using 'Magnetcode' keyword.)
Magnetcode For Android 4.1 and above
Download & Install Magnetcode

Install Magnetcode using Search using 'Magnetcode'


Android play store app. keyword and install it.
Register Magnetcode Account

After all
details are
Clik to filled
(without
start any
mistake)
1st Time Login

Get the
activation
Insert username Open your Email to code from
and password get account your Email
to login activation code
Add Command
Hide / Show All
Commands
Home
Page

Command
Groups
Add Command
Page
LCD_Show = On
LCD_Show_Text = Mr Hoon

LCD_Update
LCD_Text_Size =80
Menu

?
LCD_Align = Middle
Timer = 2 sec
Clear all
LCD_Show_Text = Welcome
LCD_Update
commands in the
Timer = 2 sec 'Home Page'
Goto = 1

Home Page
We will do 3 projects

Project 1. Emergency light


Project 2. LED light

flasher Project 3. LED

traffic light
Project 1: Emergency Light

Timer Timer
2 sec 2 sec

Timer 2 sec
Project 1 Output
Press and hold any
command to add it.
You will see
'Command added' tag.

Command added
Return to
'Home'
page.

Continue to press and


hold (e.g. 3 times) to
add more commands.
Delete any command
Method 1 Method 2
Slide command to the right Select the checkbox behind
and press 'Delete'. each command and press
'Dustbin' icon to delete.
Then
1. Background_Color = White

Change
background
color to red? Red

Click and hold


Click 'Run'
to test
1. Background_Color = Red
1. Background_Color = Red

2. Timer = 1 sec
1. Background_Color = Red

2. Timer = 1 sec

Timer = 2 sec?
2
Press and hold
How to do this?

Timer Timer
2 sec 2 sec
1. Background_Color = Red 1. Background_Color = Red

2. Timer = 2 sec 2. Timer = 2 sec

3. Background_Color = Green 3. Background_Color = Green

4. Background_Color = Yellow 4. Timer = 2 sec

4. Timer = 2 sec? 5. Background_Color = Yellow

6. Timer = 2 sec ? 6. Timer = 2 sec

Use these icons to Try out this coding.


move any command
up or down.
Add 2 more colors:
Red -> Green -> Yellow
1. Background_Color = Red

2. Timer = 2 sec
Press 'Run' to
3. Background_Color = Green
test.
4. Timer = 2 sec

5. Background_Color = Yellow But stop at yellow


6. Timer = 2 sec color
background?
No Repeat?
1. Background_Color = Red

2. Timer = 2 sec

3. Background_Color = Green

4. Timer = 2 sec

5. Background_Color = Yellow

6. Timer = 2 sec

7. Goto = 1
Always at
the bottom

Repeat? Use 'Goto = 1'


Jump to line 1
Press 'Run' to
test
1. Background_Color = Red
.
2. Timer = 2 sec

3. Background_Color = Green

4. Timer = 2 sec

5. Background_Color = Yellow

6. Timer = 2 sec

7. Goto = 1

Done? Clear all coding.


Carrot Project Board
Power: Battery 8 AA (1.5V
x8 = 12V), 12V adapter or
12V Lead acid
(Volt: 10VDC - 18VDC)

Switch to On Off power

Brain (Microcontroller):
5VDC, Greenbean, 20MHz

Wireless: Bluetooth, 30 feet


(10 meter), ID: 121600051
Carrot project (for Bluetooth connection)
Carrot Project Board
Input and Output
Digital Output: 6
(DOUT1, DOUT2...)
Digital Input: 4
(DIN1, DIN2, DIN3, DIN4)
Servo Output: 2
(SERVO1, SERVO2)
Pulse Output: 2
(PUSE1, PULSE2)
Analog Input: 5
(AIN1, AIN2, AIN3...)
Carrot project
Total: 19
Digital Output Pins (DOUT)
On= Logic 1 = 5V, Off = Logic 0 = 0V
DOUT1
DOUT2

DOUT3

DOUT4

DOUT5

DOUT6
LED
(Light Emitting Diode)
(operating volt: 1.8V to 3.3V)

Red, Orange (Amber),


Green, Blue, White
Red Black Big LED
DOUT1 GND (5mm Diameter)
DOUT2 GND
DOUT3 GND Small LED
DOUT4 GND (3mm Diameter)
DOUT5 GND
DOUT6 GND
Power up Carrot Project Board

Power on / off
indicator

Power on / off
switch

Bluetooth connection indicator


(blinking = not connected)
aways off? battery low or damaged
Test 3 LEDs with 5V and GND
Switch on Carrot board. Any LED is off?
Check wiring or LED is damaged.

5V

GND
Project 2: LED Light Flasher
Red LED On Wait for 2 sec

Wait for 2 sec Red LED off

For Dout or Pulse pin


Off = Logic 0 = 0V
On = Logic 1 = 5V, max 20mA
Project 2: Wiring
We will write a program to
turn on the red LED.

Dout1

GND
Project 2 Output
Blink red LED at Dout1

1. Dout1 = On

2. Timer = 2 sec

3. Dout1 = Off

4. Timer = 2 sec

5. Goto = 1

Press and hold to


change Dout1 = On
become Dout1 = Off
Project 2: LED Light Flasher
Turn on Carrot project
board then press 'Run'.
1. Dout1 = On
1. Dout1 = On
2. Timer = 2 sec

3. Dout1 = Off

4. Timer = 2 sec

5. Goto = 1
Connect your program to
the Carrot project board
Bluetooth pairing PIN: 1234

121600051
Done? Try to save the project
Where is the file?
Internal Storage -> 'Mydata' folder

Save as text file e.g.


abc.txt
Can use notepad
open or print
Project 3: LED Traffic Light
Red LED On

Wait for 2 sec Yellow LED off

Red LED Off Wait for 2 sec

Green LED on Yellow LED on

Wait for 2 sec Green LED Off


Project 3: Wiring
DOUT1 DOUT3

DOUT2

GND
Project 3 Output
Project 3: Traffic Light
Turn on Carrot project
board then press 'Run'.
1. Dout1 = On
2. Timer = 2 sec
3. Dout1 = Off

4. Dout2 = On
5. Timer = 2 sec
6. Dout2 = Off

7. Dout3 = On
8. Timer = 2 sec
9. Dout3 = Off

10. Goto = 1
Connect your program to
the Carrot project board
121600051
Bluetooth pairing PIN: 1234
Project 3: Upgrade edit

1. Dout1 = On
2. Background_Color=Red
3.Timer = 2 sec
4.Dout1 = Off
5.Dout2 = On
6. Background_Color=Green
7.Timer = 2 sec
8.Dout2 = Off
9.Dout3 = On
10.Background_Color=Yellow
11.Timer = 2 sec
12.Dout3 = Off
13.Text_Speech _Enable =On
14.Text_Speech_Text = Terima Kasih
15.Goto = 1
Free Ebook and Project Videos
Download Magnetcode FREE Ebooks:
www.magnetcode.com

Magnetcode Projects: www.youtube.com


(search using 'Magnetcode' keyword.)

You might also like