Using an Arduino as a slave board

Arduino serial interfacing and basic function library (This article is a work in progress)

By Mike Molianri
Me.pngUsing an Arduino as a slave board | Arduino serial interfacing and basic function library (This article is a work in progress) | Home automation, Robots, Vending machines. What do they have in common? | The Arduino Code | Third Part Title

Home automation, Robots, Vending machines. What do they have in common?

The answer is computers controlling hardware. Making lights go on and off. Controlling motors, relays and other electronic components.
Liberty Basic for windows makes programming simple but lacks the ability to directly control or interface with hardware (except the parallel port).

To make hardware interface coding simpler a set of functions is required to facilitate the communication with external hardware. Because the arduino is the most widely used hobby micro controller in the world and has so much support I wanted to make it simple for LB users to take advantage of this great platform for there projects.


The things covered in this article are limited to simple port I/O (Input and output).
  • Test if pin is high or low
    • Get input from buttons and other sensors connected to the arduino
  • Set a pin high or low
    • Turn things on and off like lights, buzzers, motors, ect.
  • PWM (Pulse width modulation) output
    • Dim lights, Control servo motors, interface with variable speed motor controllers
  • PWM (Pulse width modulation) input
    • Get input from things like sliders and position information

The Arduino Code

To make liberty basic talk with an arduino they have to speak the same language.
In this case a string is used and send over to the device followed by a carriage return character CHR$(13)

The only thing you really have to understand about the arduino code is that it must be download to the arduino board using the arduino IDE.
This can be download from the following link.
http://arduino.cc/en/Main/Software
'code here

Third Part Title

Text here.
'code here

Using an Arduino as a slave board | Arduino serial interfacing and basic function library (This article is a work in progress) | Home automation, Robots, Vending machines. What do they have in common? | The Arduino Code | Third Part Title