Hot answers tagged

4

I see multiple problems with your setup: You only take a measurement every 100ms. That measurement takes the voltage during a very short time span. But the lowest string on a guitar in standard tuning has 82.41Hz (E2). You are measuring at 10Hz. According to the Nyquist–Shannon sampling theorem you need to measure at at least twice the frequency of your ...


2

Is the "volatile" keyword really sufficient for exchange of data between threads (no ISR)? No - "volatile" just tells the compiler that the variable may change value due to something other than the immediate code being generated and informs the code-generator not to rely on the value remaining static when it would otherwise expect so. ...


2

In addition to Majenkos answer: A float cannot take any decimal number. It has a limited change and a limited resolution in that range you could say. So if often happens, that the flat (rounded) value is not a valid float. This is the case for 26.05. There is no valid float value, that is exactly 26.05. So the nearest valid float value is chosen. The ...


2

I understand. These breadboards are pretty difficult to work with. Not only fitting an ESP-32 or similar board is difficult, these breadboards are not broad enough to expose all the GPIOs on both the sides. I had solved this problem in this video. Do have a look. It might be helpful https://youtu.be/CQlbE1x2i2g


1

Welcome to Arduino Stack exchange. There are a lot of discussions and half-completed, or project-specific models available for the ESP32 simulator. My sincere advice is to go ahead and buy real hardware. By the time you take to set up the simulators (download the repo, set environment variables, connect GDB debugger or other), you would have received the ...


1

float variables don't have a number of decimal places: that's how they get their name: "floating point" - the decimal point floats around as needed. It's only when you output the value that it's rendered with a fixed (or limited) number of decimal places. Using Serial.print() the second digit is the number of decimal points: Serial.println(temp1, ...


1

The code in your sketch is unlikely to be the problem. It works fine for me after I enter the IP addresses and password for my network. According to the pubSubClient API documentation, the rc = -2 code returned by client.state() is due to the network connection having failed. As your code has already checked that it is connected to WiFi before trying to ...


1

So it turns out that I got a few things wrong. Firstly, I misunderstood the example code and made a mess of the bits to send to the MAX6921. To work out the correct mapping, I went and probed each pin of the IV-18 and noted the connection to the pins / outputs of the MAX6921 which gave me this table: BIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...


1

Solved, I changed the method a little. In a loop, I read a portion of the file and write it to the opened FTP remote file, then I close both at the end of the cycle // open FTP connection ftp.OpenConnection(); // open local file fileUpload = fopen("/sdcard/img.png", "r+"); // initialize file type ftp.InitFile("Type I"); // ...


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