Vandal S
Member level 3
gui with c#
short story
I desperately need a code for controlling dc motors attached to a pic 16f via h bridge with rs232 protocol.
Motors are controlled on and off. the problem is multiple key press. it's a car with 4 dc motors and 2 most important motors (speed and direction) are controlled by w a s d. the other 2 are optional and controlled with 8 4 2 6.
the long story
i am an absolute beginner in oop and c#. i have searched for days something that i need and except a gui from microsoft robotics studio [and that's not functional,at least according to my knowledge] i have found nothing. it's not that difficult, it's like controlling leds, on and off, no speed controll or fancy stuff, except that there is a h bridge somewhere in the circuit.
please, give me (and I thing that there are many interested; from this simple example, speed controll and other stuff could be added) an example close to what i need; the only thing that i can do at this moment is modify the visual style, but no programming so i am stuck. i have found simpleserial, a project in c# which echos a character, and except for the send part (which will be a binary vector, not the character that was pressed, the rest remains the same). the problem is key press events and multiple key pressed.
i was thinking of modifying the first value of the byte if w is pressed, and so on, the second value if s is pressed.
so, at the beginning there will be transmitted 10101010 for synchronizing (as there are rf modules between) and the data byte. if w and a are pressed, the data byte would be 1010 0000 . first 4 bits from wasd and the last from 4826.
it would be a very good thing if someone would do this in a couple of minutes because there are a lot of questions about gui, but no simple example.or at least i haven't found one.
other questions would be: how to implement the start and the stop bit?
short story
I desperately need a code for controlling dc motors attached to a pic 16f via h bridge with rs232 protocol.
Motors are controlled on and off. the problem is multiple key press. it's a car with 4 dc motors and 2 most important motors (speed and direction) are controlled by w a s d. the other 2 are optional and controlled with 8 4 2 6.
the long story
i am an absolute beginner in oop and c#. i have searched for days something that i need and except a gui from microsoft robotics studio [and that's not functional,at least according to my knowledge] i have found nothing. it's not that difficult, it's like controlling leds, on and off, no speed controll or fancy stuff, except that there is a h bridge somewhere in the circuit.
please, give me (and I thing that there are many interested; from this simple example, speed controll and other stuff could be added) an example close to what i need; the only thing that i can do at this moment is modify the visual style, but no programming so i am stuck. i have found simpleserial, a project in c# which echos a character, and except for the send part (which will be a binary vector, not the character that was pressed, the rest remains the same). the problem is key press events and multiple key pressed.
i was thinking of modifying the first value of the byte if w is pressed, and so on, the second value if s is pressed.
so, at the beginning there will be transmitted 10101010 for synchronizing (as there are rf modules between) and the data byte. if w and a are pressed, the data byte would be 1010 0000 . first 4 bits from wasd and the last from 4826.
it would be a very good thing if someone would do this in a couple of minutes because there are a lot of questions about gui, but no simple example.or at least i haven't found one.
other questions would be: how to implement the start and the stop bit?