Supla for Arduino change pictogram

AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Post

Hi! Image Hello guys! In first I want to give you my congratulats for your work, the software is really stable and simple to use. I want to ask some informations: I would like to handle the lights via a step relay with a simple switch. At the same time I have idea to use your software to command that relay, also need to detect the state of it. and change the state via the app. It will be perfect to open an electric lock of the door. One thing, is it possible to change the original pictogram of the door with mine one? One for relay closes and another for relay open?
User avatar
pzygmunt
Posts: 19465
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków

Post

Hi. Which platform do you want to use ? ESP8266/Arduino/Raspberry PI ?
At this moment the only way to change the pictogram is build own version of the smartphone app.
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Post

Arduino mega :D
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Post

possible add gpio to change the relay state such feed 5volt?
User avatar
pzygmunt
Posts: 19465
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków

Post

For Arduino you can operate the relay in non standard way by adding your own support of digitalRead/Write

void setDigitalReadFuncImpl(_impl_arduino_digitalRead impl_arduino_digitalRead);
void setDigitalWriteFuncImpl(_impl_arduino_digitalWrite impl_arduino_digitalWrite);

or just set "bistable" parameter to "true"

bool addRelay(int relayPin1, int relayPin2, bool hiIsLo, bool bistable, _supla_int_t functions);
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Post

Thanks I will try
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Post

Sorry, I can not. For example, chanel 0, pin 44. to convert to the state of HIGH, how should the code look like? :roll:
User avatar
pzygmunt
Posts: 19465
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków

Post

Please describe what exactly you want to do
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Post

Change the status of the switch programmatically. and then I can myself. :) Add a pin for on off Thank you

Return to “Help”