here is photo my usb gateway with STM32 power
it's a big difference with arduino nano
zrom69
@zrom69
Best posts made by zrom69
-
RE: What did you build today (Pictures) ?
-
RE: What did you build today (Pictures) ?
and that's a TV box turn into a mini pc more powerful than raspberry pi 3
and I installed linux with domoticez and imperihome EMMC Flash is fluid and fast
and toutsca works well8 x CPU: Amlogic S912 Octa core ARM Cortex-A53 CPU jusqu'à 2GHz (DVFS)
GPU: 750MHz + ARM Mali-820MP3 GPU Processeur
RAM: 3Go DDR3
ROM: 32Go EMMC Flash
Système d'exploitation: Android 6.0
Ethernet: 100M/1000M
WIFI: 2.4GHZ / 5.8GHZ 802.11a / b / g / n / Ac
Bluetooth: BT4.1
Latest posts made by zrom69
-
RE: 💬 Building a wired RS485 sensor network
thank you for your reply
at least 10 children in node and 30 nodes -
RE: 💬 Building a wired RS485 sensor network
and it can have blockages if there are sensors that function or even time
thanks -
RE: 💬 Building a wired RS485 sensor network
Hi,
in a node how many children can put rs-485
thanks good work -
RE: Clock with temperature, humidity and CO2 level sensors
hi
I have this error
'class SensorMQ' has no member named 'setCurveScalingFactor' -
RE: relay as a switch not as a button (domoticz)
thanks for the work you did
i add the motion sensor and light level sensor its not working well
you can help me thank you/*
Relay with toggle switch sketch
modified to work with no uplink
to gateway
Toggle switch connected between pin3 and ground.
*/#define MY_DEBUG // Enable debug prints to serial monitor
#define MY_RADIO_NRF24 // Enable and select radio type attached
#define MY_TRANSPORT_WAIT_READY_MS 5000 //set how long to wait for transport ready in milliseconds
#include <MySensors.h>
#include <Bounce2.h>#define CHILD_ID_LEVEL A0
#define RELAY_PIN 5 // Arduino Digital I/O pin number for relay
#define SWITCH_PIN 4 // Arduino Digital I/O pin number for switch
#define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!)#define CHILD_ID 1 // Id of the sensor child
#define CHILD_ID_MOT 2 //motion sensor
#define CHILD_ID_LEVEL 3
#define RELAY_ON 1
#define RELAY_OFF 0Bounce debouncer = Bounce();
int oldswitchState = 0;
bool state = false;
bool firstStart = true;
int photocellPin = 0; // The photoresistor and resistance 10 / 12KOhms connected on the pin / analog pin A0
int photocellReading;unsigned long interval= 6000;//dht.getMinimumSamplingPeriod(); // the time we need to wait
unsigned long previousMillis=0; // millis() returns an unsigned long.
unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)MyMessage msg(CHILD_ID, V_STATUS);
MyMessage msgMot(CHILD_ID_MOT, V_TRIPPED);
MyMessage msgLight(CHILD_ID_LEVEL, V_LIGHT_LEVEL);void setup(){
pinMode(SWITCH_PIN, INPUT_PULLUP); // Setup the button pin, Activate internal pull-up
debouncer.attach(SWITCH_PIN); // After setting up the button, setup debouncer
debouncer.interval(5);pinMode(RELAY_PIN, OUTPUT); // set relay pin in output mode
digitalWrite(RELAY_PIN, RELAY_OFF); // Make sure relay is off when starting up
}void presentation() {
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Relay & Toggle", "1.0");// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID, S_BINARY);
present(CHILD_ID_LEVEL, S_LIGHT_LEVEL);
present(CHILD_ID_MOT, V_TRIPPED); //me
}void loop(){
if (firstStart) { // this code is only run once at startup
debouncer.update();
oldswitchState = debouncer.read(); // set oldswitchState to the current toggle switch state
send(msg.set(false), false); // notify controller of current state no ack
firstStart = false; // set firstStart flag false to prevent code from running again
}
debouncer.update();
int switchState = debouncer.read(); // Get the update value
if (switchState != oldswitchState) { // check for new throw of toggle switch
state = !state; // Toggle the state
digitalWrite(RELAY_PIN, state ? RELAY_ON : RELAY_OFF); // switch the relay to the new state
send(msg.set(state), false); // notify controller of current state no ack
oldswitchState = switchState;
}
// Read digital motion value
boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;// only run loop if time has passed.
unsigned long currentMillis = millis(); // grab current time// check if "interval" time has passed
if ((unsigned long)(currentMillis - previousMillis) >= interval) {send(msgMot.set(tripped?"1":"0"));
photocellReading = analogRead(photocellPin)/10; // Conversion en 100% (approximatif)
// Valeur de la photorésistance avec lampe torche devant = ~1000
Serial.print("Luminosité : ");
Serial.println(photocellReading);
send(msgLight.set(photocellReading, 1));if(tripped == 1 && photocellReading < 30) // Si la luminosité est inférieure à 30%
#ifdef MY_DEBUG
Serial.print("Motion: ");
Serial.println(tripped);
#endif
}
}
/-------------------start of functions--------------------------/void receive(const MyMessage &message) {
if (message.type == V_STATUS) { // check to see if incoming message is for a switch
state = message.getBool(); // get the new state
digitalWrite(RELAY_PIN, state ? RELAY_ON : RELAY_OFF); // switch relay to new state/*---- Write some debug info----*/ Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool());
}
} -
RE: I'm not good at programming
in domoticz he sends his state of light
it is he and turn on or off -
RE: I'm not good at programming
thank you for your response
light with classic toggle switch
and i have add pir sensor
for what I ask to correct
I have to thank you