New answers tagged

0

I would do as follows: Software: Arduino is in sleep mode every x seconds (x depending on your needs), wake up then switch on and read one sensor after the other and transmit the results or whatever you want to do. then go back to sleep Hardware: as you have 4 sensors, you can connect their outputs to the arduino analog inputs (or digital...) you will ...


1

You can make a smooth transition/sliding rainbow effect by using a sine wave lookup table, then phase shifting green and blue by 120 and 240 degrees. #define RED 9 #define GREEN 10 #define BLUE 11 uint8_t sins[360] = { 127,129,131,134,136,138,140,143,145,147,149,151,154,156,158,160,162,164,166,169,171,173,175,177,179,181,183,185,187,189,191,193,195,196,...


0

I was also going through the same issue. But finally, the issue got resolved. The issue is the PIR sensor that comes with ESP8266 can work with 3.3V as well as 5V. By default, the wiring is connected to the 5V which may work fine for the Arduino device but not for ESP8266. I just removed the red cable (power cable) from the connector and connected to the ...


0

Actually, you can just run 1 Arduino and use it for All needed measurements Control power supply to sensors (power off when unneeded) Additional: use low-power modes of MCU installed in Arduino Upd: About 2nd option: You can use electric relay or transistor to control power supply to sensor. Often sensors have several connections: ground (-), Vin(+) and ...


1

The reason is that a function is evaluated just as any other expression would be. Every expression - `(x**x - 3*x + 5), for instance - has a value and a type (unless the type is void, then it has no value, or not a defined one), and that includes functions. The compiler needs to know the type of every element of the expression in order to know how to use ...


3

It returns it to whatever the function is being assigned to. Take the function: int plus(int a, int b) { return a + b; } That function takes two integers, adds them together, and "returns" them as an integer. You can then do: int c = plus(3, 4); and c will be handed the value 7 by the function. Equally you can do: Serial.println(plus(3, 4)); ...


Top 50 recent answers are included