

- Serial terminal program with horizontal scroll bar. how to#
- Serial terminal program with horizontal scroll bar. serial#
- Serial terminal program with horizontal scroll bar. full#
- Serial terminal program with horizontal scroll bar. software#
- Serial terminal program with horizontal scroll bar. windows#
One thread does nothing but output to the serial port, and the main thread reads the scroll bar and updates info used by the serial thread.This is just a basic example of sending the arduino’s 6 analogue readings to a bar graph sketch made with processing.

The program is both simplified and made more difficult to understand (sorry) by being multi-threaded. It's probably got more than it needs to duplicate the program on your system, but I couldn't figure out exactly which bits were needed.

I've downloaded Microsoft's Visual Basic Express 2005 (which is free) and managed to tie a horizontal scroll bar to the motor speed, controlled via the serial port.
Serial terminal program with horizontal scroll bar. how to#
(although, if you can figure out how to send a BREAK sequence to the com port, that's a continuous "0" state, and will drive the motor ALL the way on more than sending continuous 0 characters.) If your programming language doesn't let you output to COM1:, you may still be able to control the motor by "calling" DOS to do copy commands. Since we don't do anything "fancy" with the com port signals, you shouldn't have to investigate the arcane options that it might support. Don't forget that the system is very likely to buffer the characters that you send to the serial port, so just because a WRITE call returns doesn't mean that the motor has finished doing whatever you told it to. Being able to time the periods that the motor is on by outputting a particular number of characters would seem to be very handy. If you're writing a program, you can probably open COM1: as a file and simply write to it as if it were any other file. With the setup I had, the motor wouldn't turn at all with anything "slower" than 31.pwm, but YMMV (I think I had a 12V motor running off 5V of batteries.) The COPY command lets you string files together, so if you want your motor to speed up and then slow down again, you can do something like: copy 31.pwm+15.pwm+7.pwm+0.pwm+7.pwm+15.pwm+31.pwm com1: Similarly, you can do: copy 127.pwm com1: to run the motor at the lowest possible speed. If you want less than 5 seconds, make a shorter file.
Serial terminal program with horizontal scroll bar. full#
The "1" means there will be one "stop" bit, which will prevent us from turning the motor all the way on (oh well.) So now you can turn on the motor with commands like: copy 0.pwm com1: Since we're sending 5000 characters at about 1 per millisecond, the motor should turn on at close to full speed for about 5 seconds.
Serial terminal program with horizontal scroll bar. windows#
Create a DOS (or "Command prompt") window (assuming you're using a windows OS), and configure your com port like: mode com1: 9600,n,7,1" That tells the comm port to run at 9600bps, and send 7 bits in each character (to match up with our 7 different bit-lengths.) The "n" means NO parity, so those will be the only data bits. You can experiment with different bit rates to see how things work, which is one of the advantages of this method. It matches nicely to "about" one byte per millisecond, so in this case it corosponds to a PWM frequency of 1000Hz, which I think ought to be ok for smallish motors. An excercise for the student!)ĩ600 bps is a common bitrate. Since rs232 serial transmits LSB first, we really want to shift in zeros instead of ones. (Now that I've drawn pictures, you'll notice that the actual bit patterns aren't ideal.
Serial terminal program with horizontal scroll bar. software#
One way to control the motor without having to write ANY software is to prepare some files containing appropriate bytes (with more or less 0 bits), and simply COPY them to the COM port where you have the motor connected.
