Hi again
I've done a simple test.
I grab my dht11 sensor in my hand and after some time values are being see my values being send in my serial debug. I don't know why yesterday values was sending all the time but...
Sketch is working and reports temp changes by 1 degree.
Best regards and thx for answers
Łukasz Kostrzewa
@Łukasz Kostrzewa
Best posts made by Łukasz Kostrzewa
-
RE: Humidity and Temp sensor problem
Latest posts made by Łukasz Kostrzewa
-
RE: How To: Make a Simple/Cheap Scene Controller (with video)
Hi rechin304
Thank You for Your code...It's working great!!!
Best regards -
RE: How To: Make a Simple/Cheap Scene Controller (with video)
@Łukasz-Kostrzewa said:
send(scene.set(keyInt));
Hi
After
send(scene.set(keyInt));
Add
send(scene2.set(keyInt));
Write this code to arduino (now You can OFF all the switches) Next delete code You added and write it to Arduino once again but now in Domoticz make modifications I writed couple post higher. When You do that You will be able to control 4 scenes and another 4 will bo halpefull to OFF the first4 (when You hold the buttons) -
RE: How To: Make a Simple/Cheap Scene Controller (with video)
The 2.0 version code:
#define MY_DEBUG #define MY_RADIO_NRF24 #include <SPI.h> #include <MySensors.h> #include <Keypad.h> #define NODE_ID 14 // or set to AUTO if you want gw to assign a NODE_ID for you. #define SN "Scene Controller" #define SV "1.0" #define KEYPAD_CHILD_ID 95 MyMessage scene(KEYPAD_CHILD_ID, V_SCENE_ON); MyMessage scene2(KEYPAD_CHILD_ID, V_SCENE_OFF); const byte ROWS = 4; //four rows const byte COLS = 1; //three columns char keys[ROWS][COLS] = { {'1'}, {'2'}, {'3'}, {'4'} }; byte rowPins[ROWS] = {6, 7, 4, 5}; //connect to the row pinouts of the keypad byte colPins[COLS] = {8}; //connect to the column pinouts of the keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); byte lastState; void setup() { sendSketchInfo(SN, SV); present(KEYPAD_CHILD_ID, S_SCENE_CONTROLLER); keypad.addEventListener(keypadEvent); } void loop() { char key = keypad.getKey(); } void keypadEvent(KeypadEvent key) { switch (keypad.getState()) { case PRESSED: lastState = 1; break; case HOLD: lastState = 2; break; case RELEASED: int keyInt = key - '0'; //Quick way to convert Char to Int so it can be sent to controller if (lastState == 2) { keyInt = keyInt + 4; //If button is held, add 4. If using more than 4 buttons this number will need to be changed } send(scene.set(keyInt)); break; } }
-
RE: How To: Make a Simple/Cheap Scene Controller (with video)
You could do that but it is not a great solution.
Add to Domoticz all 8 switches (4 when pressed and 4 when hold).
In first switch (pressed switch) add Slave device (first hold switch). Do it for all 4 switches.
To 5,6,7,8 switches add Slave Device (1,2,3,4 switch).
It works like that:
When You press First number on keyboard it change state to ON and 5 to OFF
When You Hold first number on keybord it change state of 5 switch to ON and first to OFF.
Next You have to make some events to trigger some scenes or lights
I have hope I managed to explain what I mean
Best regards -
RE: How To: Make a Simple/Cheap Scene Controller (with video)
Hi
I delated my post because it pasted wrong. I try to paste it correctly but don't know how:( (hek - maybe You as an administrator can paste it corectly?)dvr123 have right that this code recognize the buton only on the first click:(
Mayby someone knows how to modify the code to work like normal buton (not the scene controller)?Best regards
-
RE: Humidity and Temp sensor problem
One hour ago Temp and humidity sensor stopped working I'm not strong enough to use arduino and my sensors:( I need to buy another raspberry pi and set it as a slave (I have 4 in my house and I have no problem with them).
Best regards -
RE: Humidity and Temp sensor problem
Hi
Maybe it is broken. I don't know :(I have couple of DHT11 sensors and some of them are working sam of them are not
From yesterday (so far) everything works great
I report later if something will broke.
Best regards -
RE: Humidity and Temp sensor problem
Hi
Powers source - phone charger 5V 1Aand Yes...I use 4,7 capacitor at the radio. -
RE: Humidity and Temp sensor problem
Hi
After hour script back to the beginning and now it sends temp + hum values every second:)
I don't understand what is going on
Best regards