|
||||||
|
Welcome to the TBCS Community Forums forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
|
|
Thread Tools |
|
#21
|
||||
|
||||
|
Sorry I haven't replied in some time, just been busy with my first week of uni and getting back into my job. Also been getting new stuff of late so that's part of the reason, but anyway, let's take a look.
I did go through your code the other day and with minimal work it would work fine with the Arduino, no issues. There are a few things that need working such as doing the maths for the speedo (we'll go into that) and also how your blinking is done. In the pseudo code, there isn't actually anything getting the time from the microcontroller to be able to process the blinking. There is a function defined in the Arduino library called millis() which can help with this, it returns a unsigned long value which represents the number of milli seconds since the microcontroller was turned on. In your main code, look at doing something like this: Code:
if ((millis() - blinkertime) > 500) {
byte buttonstate = (digitalRead(buttonLeft) | (digitalRead(buttonRight) << 1) );
blinker(buttonstate);
blinkertime = millis();
}
I don't use google talk much but I can, you can PM me your talk address to me whenever you feel like you want to.
__________________
<IMAGED REMOVED: OMEGA MADE FOXY DISAPPEAR> JDBNSN MADE FOXY CRY Antec Sonata II | Pioneer DVR-212 Good news! You can follow my website or follow me on twitter! |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|









