Visaul Basic Dot Net

Home

CNC BF16
CNC Router
CNC Links

3D DLP Printer
UM2+ Dual

Laser_Show
CO2_Laser

Engineering

Stirling

Arduino

VB.NET

VB6 - 3D
VB6 - Simulation
VB6 - Games
VB6 - Other
VB6 - Outsourcing

About

Valide CSS!

This is a simple straight forward VB.NET example, which is able to send commands to the Arduino. Each command should end with: ';'. When the Arduino reaches the ';', it will report back the received command. If you also add 2 push buttons to the Arduino (in this case connected to port 12 & 13). You could use these commands to: show current memory & erase the memory. The pc-command is stored in a 21-bytes array into the arduino. So from PC-side, do not send strings longer then 21 characters, including a final ';'!

Well, this program is not very sophisticated, but it took a while for understanding the 'Invoke Method'. That's why I post a little example here, to speed you up. ;-)

In VB.Net 2010, just simple create the form below and add a SerialPort1-object. Rename the objects, so it compares to the code ('SerialPort1' will be 'rs232' etc.). And copy the VB code.

Open a new Arduino Sketch page and copy the code below. Just add 2 push buttons to the pins 12 & 13. (There are plenty examples on the internet on how to connect a push button.) Have fun talking to the Arduino! ;)

Screen dumpCode: VB.NetCode: Sketch