fbpx

Expresate

Si además quieres enviarnos un Artículo para el Blog y redes sociales, pulsa el siguiente botón:

Avisos
Vaciar todo

cuadrupedo

11 Respuestas
6 Usuarios
0 Reactions
14.6 K Visitas
chaly012
Respuestas: 12
Topic starter
(@chaly012)
Active Member
Registrado: hace 13 años

hola estoy haciendo un cuadrupedo y este llevara dos sensores quiero que este valla a izquierda o derecha segun detecte los sensores y si no detecta nada que vakka hacia delante
alguien sabe donde consegui ese programa en basic para pic
gracias

Responder
10 respuestas
mif
Respuestas: 1095
 Mif
(@mif)
Noble Member
Registrado: hace 19 años

Coño, que buen blog MA_BLACK!

Veo mucha influencia de IEARobotics ahi 🙂 Eso me gusta!

Eres alumno de ObiJuan o de Hitec?

Responder
chaly012
Respuestas: 12
Topic starter
(@chaly012)
Active Member
Registrado: hace 13 años

Bienvenido chaly012,
La idea que propones es bastante chula, aunque creo que nos falta un poco de información para poder ayudarte.

Tienes ya el robot construido?
Que electronica has usado? Que conocimientos de programacion tienes?

Si necesitas soluciones comerciales, seguramente te inetrese buscar el robot Galatea, de nuestro colega Boops, pero si te lo estas haciendo tu, danos mas detalles y estaremos encantados de tratar de ayudarte 🙂

Un abrazo!
hola utiñizo un pic 16f873 controlo los srvos q son 8 por pwm lo programo en basic para el pic simulator ide
este es el programa pero no me va
AllDigital
Dim var As Byte
Dim a As Byte
Dim s02 As Byte
Dim s12 As Byte
Dim b As Byte
Dim x As Byte
Dim x1 As Byte
'Dim PORTA As Byte
'Dim PORTA.1 As Byte

s02 = 90
s12 = 140
var = 2
TRISA = %11111111
TRISB = %00000000
'TRISC = %00000000
loop:
If PORTA.1 = 1 Then
For a = s12 To s02 Step -1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.5, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.5, b
WaitMs var
Next b

'SERVOS 6,7
For a = s12 To s02 Step -1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.7, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.7, b
WaitMs var
Next b
'Endif
Goto loop
If PORTA.0 = 1 Then
'servos 0, 1, 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.1, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.1, b
WaitMs var
Next b

'servos 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.3, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.3, b
WaitMs var
Next b
Goto loop
Else
For a = s02 To s12 Step 1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.1, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.1, b
WaitMs var
Next b

'servos 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.3, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.3, b
WaitMs var
Next b

'SERVOS 4,5
For a = s12 To s02 Step -1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.5, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.5, b
WaitMs var
Next b

'SERVOS 6,7
For a = s12 To s02 Step -1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.7, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.7, b
WaitMs var
Next b
Endif
Goto loop

Else 'PORTA.0 = 0 And PORTA.1 = 0
'servos 0, 1,
For a = s02 To s12 Step 1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.1, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.1, b
WaitMs var
Next b

'servos 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.3, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.3, b
WaitMs var
Next b

'SERVOS 4,5
For a = s12 To s02 Step -1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.5, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.5, b
WaitMs var
Next b

'SERVOS 6,7
For a = s12 To s02 Step -1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.7, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.7, b
WaitMs var
Next b

Endif
Goto loop

Responder
chaly012
Respuestas: 12
Topic starter
(@chaly012)
Active Member
Registrado: hace 13 años

Hola, y bienvenido al foro, como dice mif tienes que aportar mas datos y el programa seria algo que tienes que empezar a hacer tu, empezar por movimientos simples y luego ponerle sensores, te recomiendo que empieces por controlar un servo.

Te paso un enlace de mi web en la que puedes ver algunos robots, no he puesto mucha informacion pero si fotos.

http://mablackrobotica.blogspot.com/search/label/Robotica " onclick="window.open(this.href);return false;
hola utiñizo un pic 16f873 controlo los srvos q son 8 por pwm lo programo en basic para el pic simulator ide
este es el programa pero no me va
AllDigital
Dim var As Byte
Dim a As Byte
Dim s02 As Byte
Dim s12 As Byte
Dim b As Byte
Dim x As Byte
Dim x1 As Byte
'Dim PORTA As Byte
'Dim PORTA.1 As Byte

s02 = 90
s12 = 140
var = 2
TRISA = %11111111
TRISB = %00000000
'TRISC = %00000000
loop:
If PORTA.1 = 1 Then
For a = s12 To s02 Step -1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.5, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.5, b
WaitMs var
Next b

'SERVOS 6,7
For a = s12 To s02 Step -1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.7, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.7, b
WaitMs var
Next b
'Endif
Goto loop
If PORTA.0 = 1 Then
'servos 0, 1, 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.1, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.1, b
WaitMs var
Next b

'servos 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.3, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.3, b
WaitMs var
Next b
Goto loop
Else
For a = s02 To s12 Step 1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.1, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.1, b
WaitMs var
Next b

'servos 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.3, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.3, b
WaitMs var
Next b

'SERVOS 4,5
For a = s12 To s02 Step -1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.5, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.5, b
WaitMs var
Next b

'SERVOS 6,7
For a = s12 To s02 Step -1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.7, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.7, b
WaitMs var
Next b
Endif
Goto loop

Else 'PORTA.0 = 0 And PORTA.1 = 0
'servos 0, 1,
For a = s02 To s12 Step 1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.1, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.0, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.1, b
WaitMs var
Next b

'servos 2, 3
For a = s02 To s12 Step 1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.3, b
WaitMs var
Next b

For a = s12 To s02 Step -1
ServoOut PORTB.2, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.3, b
WaitMs var
Next b

'SERVOS 4,5
For a = s12 To s02 Step -1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.5, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.4, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.5, b
WaitMs var
Next b

'SERVOS 6,7
For a = s12 To s02 Step -1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s12 To s02 Step -1
ServoOut PORTB.7, b
WaitMs var
Next b

For a = s02 To s12 Step 1
ServoOut PORTB.6, a
WaitMs var
Next a

For b = s02 To s12 Step 1
ServoOut PORTB.7, b
WaitMs var
Next b

Endif
Goto loop

Responder
becdanek
Respuestas: 121
(@becdanek)
Ardero
Registrado: hace 19 años

....subrealista? 🙁

Responder
ma_black
Respuestas: 282
(@ma_black)
Ardero
Registrado: hace 19 años

Coño, que buen blog MA_BLACK!

Veo mucha influencia de IEARobotics ahi 🙂 Eso me gusta!

Eres alumno de ObiJuan o de Hitec?

Gracias mif, tu blog también me encanta. No soy alumno de ellos, pero si que conozco a Juan, no en persona pero he hablado un par de veces.

Lo cierto es que estoy intentando finalizar algún robot del todo. Pero me falta el tiempo y la financiación.

Saludos

Responder
Página 2 / 3
Compartir: