Awesomeness!celeron55 wrote:I've been using my DIY inverter controller now for over 4000km in my project. It works well with full power and torque available.
I've been asked about certain additional details about the inverter protocol (by email, mostly), so I went and added some to here: http://productions.8dromeda.net/c55-lea ... tocol.html
Here's some snow drifting, because of course:
EDIT: Here's a gallery of the insides of that thing: http://packages.8dromeda.net/evprevia/gallery/
Good luck and keep safe,In the setup section of your code, define an integer counter, eg
int k=3; [This initializes the counter.]
then in your main program you can increment this counter and adjust it such that you can use it's value as the data field in the PID at the byte location.
k++; [This line increments the counter.]
k=k % 4; [This line adjusts the counter to be a value from 0 to 3. (% gives modulus remainder)]
Put your code to write the data field:
e.g. if using PID 0x11A, the counter is in data byte field number 6 or 0x06
so you could fill that byte with a line in the main program such as: