Hot answers tagged

5

Like often, the answer is: It depends. Generally it is non-blocking programming, when you do only short things on each loop. What exactly can be considered short depends on the situation, meaning, what else you want to do. For example: You are reading an analog value on every loop. The analogRead() will take about 100us (reference). I assume, that your ...


4

You're starting from the wrong end of the problem (the electronics). First, you need to decide the requirements for your system. Write down what your system is supposed to do: measure something? When & how often? Save or display the measurements? Control something based on the data? How precise must that control be (e.g. +/- .5 degC) (precision can be ...


4

As Majenko stated in the comments, an easy and discrete way would be using IR proximity sensors behind each book. The IR light from them is invisible to the eye, they are easy to read with an Arduino and often the casing of the IR LED and IR sensor are black, so that you could easily hide them in a black backplate of your book case. The IR sensor will output ...


3

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/...


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.


3

I may experiment with a simple photocell used to turn lights on or off, and a light source for night time. Mount the photocell so that its lens is upwards towards the sky, at night you'd need a light source shining on the photocell, I'm thinking a very low wattage led light to reduce power consumption, or even another photocell or astronomical time clock to ...


3

The wizecode page has some nice info. However the R5 pot (near the EN jumper) does not change the duty cycle but directly the current to the IR LED - still affects the brightness though. Too much current seems to trigger false positives - depends on your additional optical shielding. I put some black heat shrink tubing over the sensor - with a hole punched ...


3

The capacitors are just decoupling capacitors. The value is not that critical. 100nF are good values to use. On the breakout they have used just one pair of decoupling capacitors but use that pair for both power pins. The datasheet has one decoupling capacitor for each pin. You can do it either way. Personally I'd do it the datasheet way, but for a small ...


3

That depends on your requirements. An IR distance sensor will work better with different materials, since IR light is mostly reflected in very broad angles (expect for very reflective materials, like mirrors), so that uneven surfaces are also detected. But you will get a significantly worse error margin in your 50cm range. Normal IR distance sensors are just ...


3

I would tackle this not from the point of view of the filter, but from the point of view of the water itself. The water will be impeded by the filter. As the filter gradually clogs that impediment will increase. The net result will be a slower flow of water through your filter. There's a number of things you could do to detect that: Measure the incoming ...


3

Have you considered a Differential Pressure Sensor, They can be gotten for a few dollars complete with the basic electronics and drift compensation on board. Try looking for: nxp pressure sensor for a start. These will interface to the Arduino A/D. I use an absolute one for barometric pressure and a differential to measure the air pressure my fish pond, ...


3

technically yes, there is no reason you can't do that project but the issues will come in how complex you wish to make system. For example, it shouldn't be too hard to hook up the three sensors to three analogue Pins on the Arduino and then have the Arduino constantly loop to check the voltage of the sensors, from which, you would tell it to 'do something' ...


2

This is a poor product, look at this: that describes exactly the problems you (and me) are experiencing. Correct me if you've found any solutions so far. edit Try looking at description of regster 0x2f in datasheet and to this question. I think that the first problem you describe can be solved this way, the second behaviour sounds like you fried the device.


2

Recently i bought a bmp280 which is not an adafruit one and connected it to esp32 and and tried to upload the code from the examples test but i got the error no valid bmp 280 found, i searched on google and found https://www.circuitschools.com/interfacing-bmp280-with-esp-32-on-i2c-with-errors-and-solutions/ i read on i2c addresses errors,then from there i ...


2

There is a CCS811 library which supports querying the internal firmware version of the sensor, and flashing a new firmware (latest is 2.0.1). Older firmware versions used to have burn-in compensation which apparently caused more harm than good (instead, new firmware requires sensors to be burned-in during 48 hours), and also relied on an external sensor for ...


2

I saw similar behavior from 3 CJMCU-811 sensors that I bought (in one order, so probably the same manufacturing lot) in mid 2019. Two gave readings with steady, spikey, but uncorrelated upward growth. The third periodically spiked into the 2000-3000 ppm zone and then popped back to ~450 ppm (in an empty room with decent airflow). A logic analyzer on the I2C ...


2

I don't know what is the “best”, and in fact I would be interested in knowing the answer. So far the best option I found seems to be a submersible level sensor (do a Web search for these words). These are pressure sensors that you put at or near the bottom of the tank. They give you a reading proportional to the height of water above the level of the sensor. ...


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 ...


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 ...


2

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(); // ...


2

Perhaps the built-in Arduino Serial Plotter is all you need to visualize your data. I wrote a tutorial a while back that might help you.


2

A servo motor doesn't just require a single pulse to send it to a specific angle. It requires a constant stream of pulses at the right frequency for it to track what the angle should be. By sending one pulse you're just hinting where it might like to go to, then stopping. It's never going to get there, unless you keep sending those pulses fast enough. Also ...


2

It seems this was planned for the Adafruit BMP280 library but not implemented. Looking at Adafruit_BMP280.h we see commented code that has a method seaLevelForAltitude(): /* class Adafruit_BMP280_Unified : public Adafruit_Sensor { public: Adafruit_BMP280_Unified(int32_t sensorID = -1); bool begin(uint8_t addr = BMP280_ADDRESS, uint8_t chipid = ...


2

Try this following segment: I used it myself and it worked fine. As you don't get any default Method for returning the sea-level pressure from BMP280, I had to calculate on my own. #include <Wire.h> #include "SPI.h" //Why? Because library supports SPI and I2C connection #include <Adafruit_Sensor.h> #include <Adafruit_BMP280.h> //...


2

The official page for the Nano 33 BLE Sense mentions various things including the datasheet for the light sensor. That appears to be much more sophisticated than an LDR. According to the sensor documentation (above): Upon power-up, POR, the device initializes and immedi-ately enters the low power SLEEP state. In this operational state the internal ...


2

Check out this link. I guess it will work I had the same MAX30100 module what i did was removed those 4.7k resistors mounted through hole resistors on breadboard and pull-uped them using 5V and it was working fine for me


2

A tilt sensor, can be used as what you are trying to say, whenever someone (who wore it) raise his hand or move it, will trigger an alarm. If you want to carry your alarm with you then... You can use arduino nano or micro with a sensor and buzzer connected to it to just place it in gloves or watches etc.


2

it does not work unless the two sensors close simultaneously If I understand correctly, the problem is that when your Arduino detects the second transient signal, the first one is not active anymore, and your program doesn't remember it has already seen that first signal. Your Arduino has memory. Thousands of bits of memory! So it can remember quite a few ...


2

I found this code for the SRF05 and it works for the SRO4M-2 as well. Good Luck! const unsigned int TRIG_PIN=13; //RX const unsigned int ECHO_PIN=12; TX const unsigned int BAUD_RATE=9600; void setup() { pinMode(TRIG_PIN, OUTPUT); pinMode(ECHO_PIN, INPUT); Serial.begin(BAUD_RATE); } void loop() { digitalWrite(TRIG_PIN, LOW); delayMicroseconds(2); ...


2

It seems to me what you want to detect is when the filter starts backing up and the flow of water out of the filter can't keep up with the in-flow. That will let you turn off the in-flow before the tank overflows. So put a float switch or other level sensing switch on the space above the filter. Set it so it trips when the water standing on top of the filter ...


Only top voted, non community-wiki answers of a minimum length are eligible