implementation of parts of the unilynx protocol, for communicating with danfos photovoltaic inverters. Still BETA ! needs byte stuff/unstuff fixed, and some CRC are left out for niw...
main.cpp@0:66a099b01e08, 2012-08-27 (annotated)
- Committer:
- morten_opprud
- Date:
- Mon Aug 27 18:30:37 2012 +0000
- Revision:
- 0:66a099b01e08
- Child:
- 1:df4e9da66448
alive, can ping, read info and query first values from ulx :-);
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
morten_opprud | 0:66a099b01e08 | 1 | #include "mbed.h" |
morten_opprud | 0:66a099b01e08 | 2 | #include "unilynx.h" |
morten_opprud | 0:66a099b01e08 | 3 | |
morten_opprud | 0:66a099b01e08 | 4 | |
morten_opprud | 0:66a099b01e08 | 5 | DigitalOut myled(LED1); |
morten_opprud | 0:66a099b01e08 | 6 | |
morten_opprud | 0:66a099b01e08 | 7 | int main() { |
morten_opprud | 0:66a099b01e08 | 8 | rs485init(); |
morten_opprud | 0:66a099b01e08 | 9 | while(1) { |
morten_opprud | 0:66a099b01e08 | 10 | //test(); |
morten_opprud | 0:66a099b01e08 | 11 | readParameter(RAW_MEAS_VALUES, ENERGY_PRODUCTION); |
morten_opprud | 0:66a099b01e08 | 12 | |
morten_opprud | 0:66a099b01e08 | 13 | #if 1 |
morten_opprud | 0:66a099b01e08 | 14 | // ping(); |
morten_opprud | 0:66a099b01e08 | 15 | myled = 1; |
morten_opprud | 0:66a099b01e08 | 16 | wait(1); |
morten_opprud | 0:66a099b01e08 | 17 | myled = 0; |
morten_opprud | 0:66a099b01e08 | 18 | // getNodeInfo(); |
morten_opprud | 0:66a099b01e08 | 19 | wait(1); |
morten_opprud | 0:66a099b01e08 | 20 | #endif |
morten_opprud | 0:66a099b01e08 | 21 | } |
morten_opprud | 0:66a099b01e08 | 22 | } |