Docklight Application Note ArduinoSerial
Docklight Application Note ArduinoSerial
doc
run arduino.exe
Date
Auth..
V1.0
initial release
Ver.
Comment
2013-02-20 MF
Date
Name
2013-02-20
Flachmann
Flachmann und
Heggelbacher
www.fuh-edv.de
Page
1/7
Docklight_Application_Note_ArduinoSerial.doc
Upload the Sketch to your Arduino board, e.g. by using the arrow right toolbar
Double click on the Communication Channel(s) area that shows COM21 by default, or use menu
Tools -> Project Settings -> Communication to adjust the COM port, if necessary.
NOTE: The correct COM port to use is shown in the right lower corner of the Arduino environment
(COM21 in this example).
You can also find out using the Windows Device Manager: Use the Windows Start menu and type
Device Manager in the search box. In the Device Manager dialog, check the section Ports (COM & LPT)
for the Arduino entry.
TIP: If the COM port used for your Arduino Hardware is not shown in Docklight Project Settings drop down
list, just type in the correct COM port in the text box, e.g. COM21.
Date
Auth..
V1.0
initial release
Ver.
Comment
2013-02-20 MF
Date
Name
2013-02-20
Flachmann
Flachmann und
Heggelbacher
www.fuh-edv.de
Page
2/7
Docklight_Application_Note_ArduinoSerial.doc
You should see this message in the Docklight Communication Window (ASCII)
2013-02-18 20:07:09.024 [RX] - Ready
<CR><LF>
Arduino communication established
Using the Docklight Send --> buttons, you can now transmit the LED ON and LED OFF ASCII
commands to your Arduino board.
ASCII Commands and confirmation messages from the Arduino are shown in the Docklight
Communication Window (ASCII):
2013-02-18 20:08:44.297 [TX] - on<CR><LF>
2013-02-18 20:08:44.304 [RX] - LED is on<CR><LF>
Arduino reports: LED on
2013-02-18 20:08:46.031 [TX] - off<CR><LF>
2013-02-18 20:08:46.041 [RX] - LED is off<CR><LF>
Arduino reports: LED off
Of course you will now also see the Arduino board LED L or an external PIN13 LED turned off or on.
Date
Auth..
V1.0
initial release
Ver.
Comment
2013-02-20 MF
Date
Name
2013-02-20
Flachmann
Flachmann und
Heggelbacher
www.fuh-edv.de
Page
3/7
Docklight_Application_Note_ArduinoSerial.doc
Make sure the Arduino environment is set up and ready, as explained in the previous section 2:
Quick Start Blinking LED Example.
Start Docklight Scripting and open the project file Docklight-ArduinoSerial.ptp. Then open the
script Docklight-Arduino-MorseCode.pts, using menu Scripting > Open Script
Run the script using menu Scripting -> Run Script (Shift+F5).
Arduino reports:
Arduino reports:
Arduino reports:
And of course the Arduino LED should blink and send out that famous Morse code [10] sequence we all
know from them sinking ships movies
Date
Auth..
V1.0
initial release
Ver.
Comment
2013-02-20 MF
Date
Name
2013-02-20
Flachmann
Flachmann und
Heggelbacher
www.fuh-edv.de
Page
4/7
Docklight_Application_Note_ArduinoSerial.doc
V1.0
initial release
Ver.
Comment
2013-02-20 MF
Date
Name
2013-02-20
Flachmann
Flachmann und
Heggelbacher
www.fuh-edv.de
Page
5/7
Docklight_Application_Note_ArduinoSerial.doc
}
else command += c;
}
}
Docklight-Arduino-MorseCode.pts
Author: MF
Date: 2013-02-18
Example script for Docklight Application Note
Docklight_Application_Note_ArduinoSerial.pdf
How to Use:
- Open Docklight project "Docklight-ArduinoSerial.ptp"
- cross-check COM port settings as indicated in the project file
and Application Note
- Start Script: Scripting -> Run Script (Shift + F5)
V1.0
initial release
Ver.
Comment
2013-02-20 MF
Date
Name
2013-02-20
Flachmann
Flachmann und
Heggelbacher
www.fuh-edv.de
Page
6/7
Docklight_Application_Note_ArduinoSerial.doc
Next
End Sub
Function getMorseCode(ByVal letter)
arrayIndex = Asc(UCase(letter))
If arrayIndex >= 65 And arrayIndex <= 90 Then
getMorseCode = morseArray(arrayIndex - 65)
Else
DL.AddComment("No morse code for '" & letter & "'")
DL.Quit()
End If
End Function
7 References
[1]
[2]
[3]
Arduino Products
http://arduino.cc/en/Products
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
V1.0
initial release
Ver.
Comment
2013-02-20 MF
Date
Name
2013-02-20
Flachmann
Flachmann und
Heggelbacher
www.fuh-edv.de
Page
7/7