New answers tagged

0

It looks like you're trying to measure the resistance of soil by connecting an ADC input through the soil to VCC. That is not the way to to it. At the moment you effectively have this schematic for that portion: simulate this circuit – Schematic created using CircuitLab The voltage dropped across the soil is proportional to the current flowing ...


1

You need either a memory extension for your UNO - projects like Arducam did this way back 2016 and then used an OV2640 module. If you want to develop something yourself these are the steps (hurdles) to take: Get a datasheet of the camera Design a circuit including plug for Camera and a memory module (min 512Kb) Attach it to the UNO Write a library/...


0

firstly, move your pinMode() settings to setup section. in your code, when the temperature is 21 active pin will be 6 and 8. you should rewrite your code in next ways: 1: if (t < 22) { ... its cold temp ... } else if (t > 26) { ... its hot temp ... } else { ... it's nor temp ... } 2: if (t < 22) { ... its cold temp ... } if (t > 26) ...


1

This is not a complete answer, but an idea of how to accomplish the task. I just typed it in without testing the code. Use arrays to hold variables. That way a loop can be used to service the three sensors and the three LEDs.. for (i = 0; i<3; i++) { currentTime = millis(); // ...


3

This looks like something out of an Arduino n-part “sensor kit”. It’s hard to tell because the quality of the image is not very good. My guess is, this is an analog temperature sensor, like in this link, part number 18. You can also find an example sketch there.


0

The solution is, You need to implement custome pulse in funtion unsigned long rdPulseIn(int pin, int value, int timeout) { // the following comments assume that we're passing HIGH as value. timeout is in milliseconds unsigned long now = micros(); while(digitalRead(pin) == value) { // wait if pin is already HIGH when the function is called, but ...


0

I've written this code without access to a compiler, so there might be errors. Use it as an idea how to solve the quest. Hopefully the comments are helpful. Don't hesitate to ask if you do not understand or correct me if you see an error. #include <Servo.h> Servo myservo; // end positions of the servo // declared as constant values const int ...


2

there are a few DIY, open source armband or watch models like : https://www.tindie.com/products/ttgo/t-wristband-diy-programmable-smart-bracelet/ which has the sources and tutorials on : https://github.com/Xinyuan-LilyGO/LilyGO-T-Wristband it's based on ESP32 and is Arduino ready.the space constraint may not allow for adding a new sensor, but it already ...


1

The Arduino IDE gives you a massive clue Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno" sketchX:2:2: error: #endif without #if #endif ^~~~~ sketchX:3:10: fatal error: ESP8266WiFi.h: No such file or directory #include <ESP8266WiFi.h> ^~~~~~~~~~~~~~~ compilation terminated. exit status 1 #endif without #if This report would ...


2

You have far too many variables and unknowns there. Primarily you need to know what the average current draw for your circuit is. Secondly you need to decide how long the solar powers are allowed to take to recharge the battery. You have to think not only about runtime but also charge time. The charge time dictates the maximum capacity of the battery, and ...


0

Your handling of millis() is wrong. With these two lines: unsigned long StartMillis = millis(); unsigned long CurrentMillis = millis(); StartMillis will always have the same value as CurrentMillis. (Ok, I guess its possible for millis() to return a value that's increased by 1 the second time it's called, but that is extremely unlikely. The 2 lines takes ...


0

For example: float basa = scale.get_units(); digitalWrite(led1, LOW); digitalWrite(led2, LOW); if( basa >= 2 && basa < 4 ) { digitalWrite(led2, HIGH); } if( basa >= 4 ) { digitalWrite(led1, HIGH); } EDIT: as suggested by @chrisl (see comments) If understand you problem correctly, you try to light up 2 LEDs according to the value ...


Top 50 recent answers are included