Boa tarde.
Eu ja a muito tempo construo "engenhocas", mecanicas, electronicas, mas no que toca a programação estou a iniciar.
Começei por Visual Basic, e agora estou a construir um circuito com o microcontrolador PIC16F628, que permite controlar 8 servos atraves da porta serial COM.
Mas não tenho conhecimentos sufecientes para construir o programa (ja fiz alguns mas não com este objectivo) que consiga controlar servos pelo PC atraves da porta Serial COM, o PC envia bits atraves da porta serial para o microcontrolador.
Isto é para um projecto que está a ser avaliado neste momento, eu basicamente quero controlar "manualmente"\ou de forma automona caso seja possivel em VB, ou seja um robot onde o seu processamneto é feito num PC.
Desde ja fica aqui uma pergunta:
Com Arduino Duemilanove dá para controlar quantos servos? é possivel controlar esses servos por um programa no PC? em que liguagem? de certo C ?... mas pode-se fazer com outra por ex: VB?
Protocol PIC 16F628. To communicate with the servo controller, send sequences of five or six
bytes. The first byte is a synchronization value that must always be 0x80 (128). Byte 2
is the Pololu device type number, which is 0x01 for the 8-servo controller. Byte 3 is one
of six values for different commands to the controller; the commands are discussed
below. Byte 4 is the servo to which the command should apply. Bytes 5 and possibly 6
are the data values for the given command. In every byte except the start byte, bit
seven must be clear. Thus, the range of values for bytes 2-6 is 0-0x7F (0-127).
Command 0: Set Parameters (1 data byte)
" Bit 6 specifies whether a servo is on or not; a 1 turns the
servo on, and a 0 (default) turns it off.
" Bit 5 sets the direction the servo moves, which only
applies to 7- and 8-bit position commands. If the bit is 0
(default), a larger position number causes the output
pulse to get bigger; if the bit is 1, a larger position
number will make the output pulse shorter.
" Bits 0-4 set the range through which the servo moves in
7- and 8-bit commands. A larger value will give a
larger range, and setting the range to 0 will make the
servo always stay at neutral. Given the same range setting, an 8-bit position
command will move the servo through twice the range of a 7-bit position command.
The default range setting is 15, which will give approximately 180 degrees in 8-bit
commands and 90 degrees in 7-bit commands.
Existindo outros comando mas por agora este chega-me
Por favor peso ajuda.
Obrigado, com os melhores comprimentos Zav.