Separation of class LED selection and state control.
The label of the LED corresponds to the silk screen of the iot2050.
Before we use one list to enumerate all the led and its state.
like: User1 Led Red User1 Led Green User1 Led Orange
User2 Led Red User2 Led Green User2 Led Orange
if we need to add or delete the LED, we should change this list
After Separation of class LED selection and state control
one is Led selection: USER1 USER2
the other is status selection: Green Red Orange
For this structure, if the led or status changes, We don't need
to enumerate all the states.
Also there is a problem with the old version:
When we use one node to control led show green, then we use another node to control
led show red. The result we expect is led red, but the actually result is led orange.
This is caused the previous green do not turn off. State change is wrong.
This refact would also fix it.
Signed-off-by: chao zeng <chao.zeng@siemens.com>
Signed-off-by: chao zeng <chao.zeng@siemens.com>
Based on eclipse/mraa@a9f0ff22 iot2050 platform add.
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-led: add led
This patch introduces LED node in GPIO category.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-ain: add iot2050 board
Add IOT2050 board in list of possible boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-dout: add iot2050 board
Add IOT2050 board into list of possible boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-pwm: add iot2050 board
Add IOT2050 board into list of possible boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio: clean up on close for ain, pwm, dout
Required as nodejs will only lazily delete the node objects, and we may
race with the next user requesting the resources.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add USER button
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
Co-authored-by: Jan Kiszka <jan.kiszka@siemens.com>
* mraa-gpio-din: add iot2050 board
This patch adds iot2050 board in possible list of boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add cleanup on close
Required as nodejs will only lazily delete the node objects, and we may
race with the next user requesting the resources. ISR thread release.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: extend GPIO lines
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add configurable GPIO mode for DIN
GPIO mode wasn't set correctly, it was set from Pinmuxes modes instead
of GPIO. Add way to control GPIO modes on DINs from Node-RED with
possible values from mraa : Strong, Hiz, Pull-down, Pull-up.
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add support for initial message from digital input
This allows to send out an initial message with the current digital pin
state on startup, simplifying initializations of certain flows.
Based on siemens/meta-iot2000@5fc2bbe patch 0003.
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* Attempt to catch errors from wemo-lookup
This is to catch errors when device is offline
* Put request back
Will look at making it all http.request later
* Fix some messages
* Bump wemo version
* Fix typo
* Attempt to catch errors from wemo-lookup
This is to catch errors when device is offline
* Put request back
Will look at making it all http.request later
* Fix some messages
* Bump wemo version
* Add files via upload
* Update pimcp3008.js
implementation of the discussion
* Update pimcp3008.js
Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
* Added decimal places option + bugfix + keywords
Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility.
Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then.
Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
* Added decimal places option + bugfix + keywords
Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility.
Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then.
Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
* Added decimal places option + bugfix + keywords
Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility.
Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then.
Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.