Inicio » I-DROID » Programación » basic X24 empezando con ventexx proyect
icon10.gif  basic X24 empezando con ventexx proyect [mensaje nº560] mar, 13 noviembre 2007 11:00 Ir al próximo mensaje
fallout no está actualmente en el foro fallout
Mensajes: 62
Registrado: julio 2007
Member
bueno, como el bobot ya esta montado, lo unico que me queda es programar, aqui tengo mi primera version cocker del software, de momento lo que hace es que el robot se levante correctamente este como este xD es un comienzo xD

Option Explicit
Const SCL As Byte = 6 ' I2C clock - SCL
Const SDA As Byte = 5 ' I2C data - SDA

Const SD21 As Byte = &HC2 'SD21 I2C Address

'pata 1
const S01 as byte = 63
const S01P as byte = 84
const S01N as byte = 105
const S02 as byte = 64
const S02P as byte = 85
const S02N as byte = 106
const S03 as byte = 65
const S03P as byte = 86
const S03N as byte = 107
'pata 2
const S04 as byte = 66
const S04P as byte = 87
const S04N as byte = 108
const S05 as byte = 67
const S05P as byte = 88
const S05N as byte = 109
const S06 as byte = 68
const S06P as byte = 89
const S06N as byte = 110
'pata 3
const S07 as byte = 69
const S07P as byte = 90
const S07N as byte = 111
const S08 as byte = 70
const S08P as byte = 91
const S08N as byte = 112
const S09 as byte = 71
const S09P as byte = 92
const S09N as byte = 113
'pata 4
const S10 as byte = 72
const S10P as byte = 93
const S10N as byte = 114
const S11 as byte = 73
const S11P as byte = 94
const S11N as byte = 115
const S12 as byte = 74
const S12P as byte = 95
const S12N as byte = 116
'------------------------------------
'***********menu principal***********
'------------------------------------
Public Sub Main()

Call levantarse()

End Sub

'------------------------------------
'****************subs****************
'------------------------------------
sub levantarse()
posicion(S01,128,S02,256,S03,256)
posicion(S04,128,S05,256,S06,256)
posicion(S07,128,S08,256,S09,256)
posicion(S10,128,S11,256,S12,256)
call delay(2.0)
posicion(S01,128,S02,128,S03,128)
posicion(S04,128,S05,128,S06,128)
posicion(S07,128,S08,128,S09,128)
posicion(S10,128,S11,128,S12,128)
call delay(2.0)
End Sub

Sub posicion(ByVal SV1 As Byte, ByVal a As Byte, ByVal SV2 As Byte, ByVal b As byte, ByVal SV3 As Byte, ByVal c As Byte)
Call I2cByteWrite(SD21, SV1, a)
Call I2cByteWrite(SD21, SV2, b)
Call I2cByteWrite(SD21, SV3, c)

End Sub 


'--------------------------------
'I2C Sub Routines by Gerald Coe
'--------------------------------

' writes I2cData to I2cReg at I2cAddr

Sub I2cByteWrite(ByVal I2cAddr As Byte, ByVal I2cReg As Byte, ByVal I2cData As Byte)
Call I2cStart()
Call I2cOutByte(I2cAddr) ' send device address
Call I2cOutByte(I2cReg) ' send register address
Call I2cOutByte(I2cData) ' send the data
Call I2cStop()
End Sub

Sub I2cOutByte(I2cData As Byte)
Call ShiftOut(SDA, SCL, 8, I2cData) ' shift data out
Call PutPin(SDA, bxInputTristate) ' turn SDA around
Call PutPin(SCL, bxOutputHigh) ' and clock in the ack' bit
Call PutPin(SCL, bxOutputLow)
End Sub

Sub I2cStart() ' I2C start bit sequence
Call PutPin(SDA, bxOutputHigh)
Call PutPin(SCL, bxOutputHigh)
Call PutPin(SDA, bxOutputLow)
Call PutPin(SCL, bxOutputLow)
End Sub

Sub I2cStop() ' I2C stop bit sequence
Call PutPin(SDA, bxOutputLow)
Call PutPin(SCL, bxOutputHigh)
Call PutPin(SDA, bxOutputHigh)
End Sub
Re: basic X24 empezando con ventexx proyect [mensaje nº762 es una respuesta al mensaje #560 ] sáb, 05 diciembre 2009 04:01 Ir al mensaje anterior
yoyohh no está actualmente en el foro yoyohh
Mensajes: 15
Registrado: diciembre 2009
Junior Member
When you are purchasing a desk, you should think about what you will use the desk for. Is it going to be something as simple as doing your homework or will it be wow power leveling the focal point of a home wow gold office that you are setting up? If you will be using a desk for very wow power levelingcasual purposes, you may not need one that is as elaborate or involved. There aion power leveling are a few features that can make life easier.
There are desks which are aion gold intended for use with computers. They can include storage space cheap wow power leveling for a central computing unit, warcraft goldcord control devices and drawers which can buy wow power leveling store and allow access to keyboards. Look for computer desks which place components at ergonomic levels. This means placing the keyboard so that the wrists are in a neutral position and the monitor is at eye level. If you are doing a lot of work this can be a great help.
Hilo de discusión anterior:Programa Java
Hilo de discusión siguiente:RECUPERAR PROGRAMAS FORO PLANETA
Ir al foro:
  


Fecha y hora actual: lun sep 6 23:24:33 CEST 2010

Tiempo total tomado para generar la página: 0,05012 segundos
.:: Contacto :: Principal ::.

Powered by: FUDforum 2.7.6.
Copyright ©2001-2006 FUD Forum Bulletin Board Software