300ms Pulse High (of full battery volts, this is not a data pulse but a DG419 (maxim brand) voltage pulse)
- Then data
(your Start up packet you capture)
- a break
Then your joystick data
(if the joystick is not centered it wont start till it is '192')
Column number Joystick Sent start with 96 : Controller Replies start with 33
0 1 2 3 4 5 6 7 8 9 : 0 1 2 3 4 5
96 193 192 255 223 128 140 128 180 15 33 128 128 192 158 15
// If 'off' turn 'on'
// check state, if on/off button is pressed, change state to "ON" and run start up sequence.
else if (onOffVal > 1500 && onOffState == LOW)
{
onOffState = !onOffState; // toggle state to HIGH if in'off mode' and on/off button is pressed
digitalWrite(led, onOffState); // turn on LED pin to get visual indication of on/off state
sharkStartup(); // call function sharkStartup()
}
// If 'off' turn 'on'
// check state, if on/off button is pressed, change state to "ON" and run start up sequence.
else if (onOffVal > 1500 && onOffState == LOW)
{
onOffState = !onOffState; // toggle state to HIGH if in'off mode' and on/off button is pressed
digitalWrite(led, onOffState); // turn on LED pin to get visual indication of on/off state
sharkStartup(); // call function sharkStartup()
fakeData (); // call fake Joystick data packet so that the Power Module arms, to allow for 'dirty pots'
}
// Pin outs for RS485 chip
const int roPin = 6; // to RO of Max485 to RX of Arduino
const int dePin = 7; // to DE and RE of Max485
const int diPin = 9; // to DI of Max485 to TX of Arduino
woodygb wrote:My diagram?....That is a copy of one you posted.
gcebiker wrote:woodygb wrote:My diagram?....That is a copy of one you posted.
...not sure where it came from then...i cant draw that well.
Return to Everything Powerchair
Users browsing this forum: acid_coke, Bing [Bot], shirley_hkg and 78 guests