woodygb wrote:Well ...mine is alive!!
woodygb wrote:Improved drawing ...previous deleted.
2. Data format
The data shall be transmitted in standard asynchronous serial format as supported by the UARTs on microcontrollers. The data
rate shall be 38400bps, with 1 start bit, 8 data bits, and 2 stop bits. With updates every 20ms, this allows for 69 bytes to be
carried on the bus for each update (assuming 0 delay between bytes, which is not likely due to microcontroller processing
times). This means that if the SR sends a total of 20 bytes, there is time for 49 from the SPM. 38400 is the fastest data rate
which can be accurately generated by most microcontrollers with 8MHz crystals, and it is a rate which can be directly handled
by a PC serial port.
Words for monitoring input pins (the interupt)
if "Code if the monitored pin has information available"
onOffVal = Monitored interupt pin new data
if (onOffVal < 1300 && onOffState == HIGH)
{
onOffState = !onOffState; //toggles onOffstate from HIGH to LOW (if it was HIGH when the on/off button is pressed)
digitalWrite(led, onOffState); // Turn off the LED on arduino as indication of state
digitalWrite(dePin, LOW);
delay (100);//
}
woodygb wrote:It seems that you are resistant to the 2 resistor mod that I suggested for the SBH B ... why not give it a whirl?
woodygb wrote:It seems that you are resistant to the 2 resistor mod that I suggested for the SBH B ... why not give it a whirl?
woodygb wrote:I'll try and knock up a complete sketch for you to try over the next few days.
Return to Everything Powerchair
Users browsing this forum: jefferso, mentado020477, shirley_hkg and 47 guests