text:
Connecting Web Server in GoDaddy Hosting
I have a domain. It is hosted by GoDaddy. I need to connect that server and receive some data by executing PHP files.
I am not sure about the components.
Tutorials on internet describes how to control esp8266 from web server which is i do not want.
Also i found arduino uno wifi board/wifi shield but in arduino store, it says: this product is 'retired'.
So do you recommend any component for this task or should i go with arduino uno wifi?

Have you also searched for something like "esp8266 web request"? Because that is what you would need to do. It doesn't matter, that it is PHP, because that is server side programming. The ESP doesn't execute the PHP site, the server does.

I have a domain.

Congratulations.

It is hosted by GoDaddy.

You have my deepest sympathies.

I need to connect that server and receive some data by executing PHP files.
I am not sure about the components.
Tutorials on internet describes how to control esp8266 from web server which is i do not want.

"Controlling" an ESP8266 from a web server is nothing more than making a request to a web server and responding to something the web server sends back.
If you don't want to respond to what is sent back you don't have to. You just have to make the request. That request can contain whatever you want in the way of data and sensor values.

Also i found arduino uno wifi board/wifi shield but in arduino store, it says: this product is 'retired'.

Yes. It's been replaced with the Arduino WiFi Rev 2, which is a more modern AVR MCU coupled with an ESP32 based WiFi interface.
It's pretty wasteful really, since the WiFi interface is considerably more powerful than the AVR that it's connected to.

So do you recommend any component for this task or should i go with arduino uno wifi?

I'd recommend an ESP32 based board. They're cheap, have direct connection to WiFi, very very powerful, plenty of inbuilt peripherals (unlike the ESP8266), and above all have great software support, examples and tutorials.

Thanks, I decided to buy nodemcu board


text:
DHT11 not working with LED in arduino
the point of my code is to turn on a LED when the humidity level reaches a certain amount. However it reads the amount of humidity but the LED is not turning on. Why isn't it working??
#include <SimpleDHT.h>

// for DHT11,
//      VCC: 5V or 3V
//      GND: GND
//      DATA: 2
int pinDHT11 = 2;
SimpleDHT11 dht11;

void setup() {
  Serial.begin(9600);
  pinMode(9, OUTPUT);
  }

void loop() {
  // start working...
  Serial.println("=================================");
  Serial.println("Sample DHT11...");

  // read without samples.
  byte temperature = 0;
  byte humidity = 0;
  int err = SimpleDHTErrSuccess;

  if (humidity > 70 ) {
     digitalWrite(9, HIGH);
  }
  else if ((err = dht11.read(pinDHT11, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
    Serial.print("Read DHT11 failed, err="); Serial.println(err);delay(1000);
    return;
  }

  Serial.print("Sample OK: ");
  Serial.print((int)temperature); Serial.print(" *C, ");
  Serial.print((int)humidity); Serial.println(" H");

  // DHT11 sampling rate is 1HZ.
  delay(1500);
}

Can you please share the schematic

why do you expect it to light? ... you set the humidity to zero just before you check if it is above 70

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How to Use Arduino Wifi Shield To Receive/Send Info
I am doing an engineering project where I am using an Arduino Uno to try to open a window with a motor when the device is activated. I want to activate it by using a phone to somehow send it a command to “turn on.” I have tried to use the ESP8266 but couldn’t get it working and now have an Arduino Wifi Shield but am very confused on how to use it to do this task. I am new to understanding Arduino so any help would be appreciated.
I found a tutorial on how to connect the wifi shield to internet on the arduino website but am not sure what I would do after this.
Thanks!

it would be almost the same as using the ESP8266 .... what problems did you have with the ESP8266?

ESP8266 is not easy for beginner,  Arduino Wifi Shield is retired.
If you use either ESP8266 or  Arduino Wifi, You can control via Web. There are a lot of examples about control via web on Internet.
However, there is a very simple way to control Arduino via Web, use PHPoC WiFi shield. This shield is pretty easy to use (plug and play), It has built in web apps (can be customized). See this example

use Blynk service or similar

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
What kind of antenna should i use for my esp8266 module?
I have an esp8266 module and i want to increase its range by adding an antenna to it. What kind of antena should i use. Can i use an antenna from a RC car remote?

You need a 2.4GHz antenna. 2) There is no antenna connection on that module, so you will have to bodge it: https://www.instructables.com/id/External-Antenna-for-ESP8266/

An antenna from a RC car remote won't work? Can you send me a link of the antenna that you are talking about?

A 2,4GHz antenna is a 2.4GHz antenna. Antennae have to be a specific length and tuned to a specific frequency or they are next to useless (or worse, can reduce your range). If you can't be bothered to look for one in a shop using that simple search term, then rip one off an old dead WiFi router.

@Majenko im gonna rip off my old router's antenna. Thanks for the help

You must use a WiFi (2.4 GHz) antenna. From the picture in your post, you have one of the esp8266 modules with a "built-in" antenna implemented via traces on the PCB. You cannot add an external antenna without removing the old one first, and even that will be very dodgy - you'll likely render your esp8266 useless for any purpose.
Instead, you could get an esp8266 that is made for connecting an external WiFi antenna. See the Wikipedia article for details. It specifically mentions model # ESP-WROOM-02U as having a connector for an external antenna.


text:
Items needed to build an automatic watering system
I would like to build an automatic watering system. So my research brought me to the following items:

Breadboard Solderless Prototype PCB Board – ALLDE BB-007 (3pcs) 400 Pin with 4 power Rails and Double Sided Tape
Capacitive Soil Moisture Sensor (Operating voltage: 3.3 ~ 5.5 VDC, Output voltage: 0 ~ 3.0 VDC, Interface: PH2.54-3P)
1 Channel 5V Relay Module (VCC: Connect 5V Positive Pole Power Supply, GND: Connect 5V Negative Pole Power Supply)
Mini Water Pump (DC Voltage: 3-5 V)
Arduino UNO REV3 [A000066]

I am beginner in electronics so I have some very basic questions. Given the above specifications, and assuming I would like to power this system with battery and not to a power outlet, what battery do I need to power up the Arduino? I would like to have this system running for at most 30 days. The system will be running constantly until the moisture sensor indicates that watering is needed, in which case will run the mini water pump for some time (I don't know how long this will be running).
Could a battery power up this system? I am not sure if I can link products, but this system is based on this system if I forgot to include some critical information about the system.
So to summarize, is is possible to power up this system with a battery pack, if so which battery should I use?

Depending on the actual power needs (mainly of the pump motor), you might get away with a simple USB power bank with enough capacity. Though some power banks cut the power completely, if you don't draw a minimal current from them.

what is your water source and how big a garden bed or pot are you watering? If you are connecting to a tap, why use a pump? If you are not, can you design it to gravity feed the water?

For start, I would be seriously supprised if 5 volt pump does much good and vould start from 12VDC (car or campa-van stuff...) I would be supprised if you do not have 12DC supply around (from old router, chinese gimic sliming devices, christmas light box, cable setup-box...)
Don't panic, You may be able to get relay capable of switching higher Voltages.
Second: Newer connect anything that has solenoid directly to arduino. (not even relay). Most IC's or MCU's are only able to handle opening mosfet or a transistor, only some can handle one LED. Although in the moment relay switches off, it (its induced current) will take Arduino with it. if instead you use some common cheap NPN transistor and a diode across(in opposite direction).
I recommend soldering. relays and the things you power from them.
last get an IP55 box from nearest electric shop.

simulate this circuit – Schematic created using CircuitLab
And lastly I would have replaced UNO for NANO here. Its much more compacr and fits easily into IP55 box
 For battery you van use car battery...
I Find since Yuasa started destroying (buying ) competition, the lead-acids lifespan gone far down (on alarms often insufficient in a year)

I'd suggest feeding the system with a 12V lead-acid battery and a buck DC/DC converter with 5V output. (Those are more efficient than the regulators in Arduinos.) You could feed the regulated 5V directly into the USB port on your Arduino. You'll probably need a filtering capacitor on the Arduino 5V input to reduce fluctuations in power as the pump turns on and off however.
You'll need to do some back-of-the-envelope calculations on the power consumption of the Arduino, the on current of the water pump, the expected max duty cycle of the pump, and the efficiency of the DC/DC converter. That will let you estimate the power consumption of the whole system in mW/hr. You can then get a battery big enough to power it for your desired run-time. If you add a solar powered charging system you could increase your run-time or even make it run purely on solar power (with a big enough panel and enough bright sunshine.)


text:
Arduino Firebase ESP8266 Connection
I am working on a project that needs data to be stored in cloud db so that I can access the data in a mobile application. For database I have considered Firebase. I am following the following link. But when i try to install the libraries i am getting No such file or directory found errors for memory, queue, Firebase.h, vector, functional, utilities (not all but different packages shows different errors). I tried downloading different packages from github. But still had the errors. Where can I find the correct working program? Thanks in advance.

The sketches in the linked tutorial are missing the includes. The wiring is missing  a wire.

@Juraj Can you please tell me what are the additional wiring that are required?

the tutorial is useless. forget about it. the sketch is for the esp8266, not for Uno so there should be no Uno. the Uno is used for power and the USB chip, but nothing about it is explained. there are no links to resources, nothing about esp8266 arduino core package etc

@Juraj Actually I need an arduino uno because the other part of the project receives data from bluetooth sensor (HC-05), and i need to store the received data in the database. Or is there any way to do this without Arduino Uno. (I am completely new to Arduino Programming. So please dont mind if my questions are silly).

you could not use two serial devices on one Uno..use an esp8266 development board with USB and power regulator. I recommend Wemos D1 Mini. https://docs.wemos.cc/en/latest/d1/d1_mini.html

@Juraj My project is to scan the available Bluetooth signals available and to upload them to the database. For scanning available Bluetooth signals I am using HC-05 AT command (AT+INQ). I have stored the read signals into a string in Arduino Uno. Can you please help me on how to continue further to upload this data to the database?

it is not simple. there is no arduino library for Firebase on Uno. so you must do the communication with Firebase in a sketch on esp8266 and code the data exchange over SoftwareSerial between Uno and esp-01

The usual Firebase library for esp8266 is https://github.com/FirebaseExtended/firebase-arduino.
And there is some new Firebase library in Library Manager in IDE. The "More info" link leads to https://github.com/mobizt/Firebase-ESP8266

I am still getting this error.

 #include <memory>

          ^~~~~~~~

compilation terminated.```

did you install the esp8266 boards package? the library is for esp8266, you can't compile it for Uno


text:
Arduino Ultrasonic Sensor AnalogRead
i have an ultrasonic sensor. The sensor normally works stably. But I have to carry the data cables of this sensor for 50 meters and take reading. When i do this, when I extend the cable, the values I get from the sensor are not read stably.
I need to raise the sensor voltage so I can fix this problem, how can you help me?

Can you put another Arduino next to the Ultrasonic Sensor and connect them both over WiFi/BT or a radio module?

you'll need an interconnection designed to span such distances, like ethernet, wifi,  rs485, etc.

I take a value between 0-5 Volts according to the distance. I want to increase these values from 0-5 Volts linearly to 10-15 Volts. How can I do that?

Sounds like an XY problem: increasing the voltage will not "fix" the problem, it will only slightly improve performance. But only if you amplify the signal. Shifting 0-5V to 10-15V will do nothing! You just shouldn't transmit an analog voltage over such a long distance. You'd better transmit a 4-20mA signal or even better choose a suitable digital interface

All ultrasonic distance sensors, that I have seen so far, don't output an analog voltage. What sensor do you have?

What kind of sensor ? Pulse output ? Serial output ? Only extend data cables ?


text:
Not output on serial monitor, sending string on serial.print
I get two 10-bit values from analog pins. These two values in a string, ";" combine with.
for ex:  515; 510
I am sending it to another arduino via Serial.print. I cannot display this string expression on other arduino's serial monitor. But when I press the reset button of Coordinator arduino, there are a few values. Can you help me?
My Coordinator Code:
#include <SoftwareSerial.h>
#define xBeeRxPin 10
#define xBeeTxPin 9
int deger3;
int deger4;
SoftwareSerial xBeeSerial(xBeeRxPin, xBeeTxPin);

void setup() {
  //Serial.begin(9600);
  xBeeSerial.begin(38400);
  }void loop() {

    deger3 = analogRead(A0);
    deger4 = analogRead(A2);

    String deger5 = " " + (String)deger3 + ";" + (String)deger4 ;

    Serial.println("string ifade: " + deger5);

    xBeeSerial.print(deger5);
  }

My Receiver Code:
#include <SoftwareSerial.h>
#define xBeeRxPin 10
#define xBeeTxPin 9
SoftwareSerial xBeeSerial(xBeeRxPin, xBeeTxPin);
String d1;

void setup() {
  xBeeSerial.begin(38400);
  Serial.begin(38400);
}
void loop() {
  if(xBeeSerial.available()){
    d1=xBeeSerial.readString();
    Serial.print(d1);
  }
}

I obtained the values I wanted and performed the separation. I am sending a list of joystick positions via the serial connection to the arduino in the following format
515;520
Which would be parsed as:
x=515
y=520
MyCoordinator:
#include <SoftwareSerial.h>
#define xBeeRxPin 10
#define xBeeTxPin 9
int deger3;
int deger4;
SoftwareSerial xBeeSerial(xBeeRxPin, xBeeTxPin);

void setup() {
  Serial.begin(38400);

}void loop() {
  xBeeSerial.begin(38400);
  deger3 = analogRead(A0);
  deger4 = analogRead(A2);

  String deger5 =  (String)deger3 + ";" + (String)deger4 ;
  Serial.println("string ifade: " + deger5);

  xBeeSerial.println(deger5);

  delay(200);
}

MyReceiver:
#include <SoftwareSerial.h>
#define xBeeRxPin 10
#define xBeeTxPin 9
SoftwareSerial xBeeSerial(xBeeRxPin, xBeeTxPin);
String d1,d2,d3;

void setup() {
  xBeeSerial.begin(38400);
  Serial.begin(38400);
}
void loop() {
  if(xBeeSerial.available()>0){
    d1=xBeeSerial.readStringUntil('\n');
    //Serial.print(d1);
    d2 = d1.substring(0,d1.indexOf(59));
    d3 = d1.substring(d1.indexOf(59)+1);
    Serial.println("x ekseni: " + d2);
    Serial.println("y ekseni: " + d3);
  }
}

There is a fundamental problem with your communication strategy, and that is you have nothing to tell the receiver "This is the end of a message".
You are sending a constant stream of
 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510 515; 510.....

and the receiver really doesn't know what to make of that.
This is because you are using the function .readString() at the receiver. This will blindly receive characters and store them in the target string up until the point those characters stop arriving. And that happens only after a break of at least 1 second in transmission. That never comes. So never ends. That is, until you reset the sender and it sees that break in transmission.
It's a very crude function and I'd never recommend anyone ever using it for anything.
Instead you need to break your transmission up into separate lines with .println() or appending \n to the string.  Then you can use .readStringUntil('\n') to get each line in turn and display it.
Also, on a side note, you really shouldn't be appending all your data to a string then sending the string, that's completely redundant. Just send each individual part of the data as separate prints. All you're achieving with all that String manipulation is to fragment your heap and cause your code to be unstable.

Can I handle it using xBeeSerial.end, like xBeeSerial.begin?

No. You have to construct a proper syntax and flow of information. Just like English. At the moment you're sending the contents of a book all on one line with no punctuation and no paragraphs. Do it properly. Don't try and cut corners. You will just end up even more frustrated.

I am newbie in working with Arduino. It's really hard for me. Also, i am not good at English, sorry about that. Can you make improvements directly to the code?

I have told you explicitly what to change. I'm not going to program it for you too.

if(xBeeSerial.available()){
d1=xBeeSerial.readStringUntil('\n');
Serial.println(d1);
}

509;509 509;508 510;508 510;508 510;508 510;508 510;508 510;508 510;508 511;508 510;508


text:
NodeMCU hc05 Connection
I am using a NodeMCU from Amica. I tried interfacing the HC-05 module to the NodeMCU.
The following code works fine without any errors
#include<SoftwareSerial.h>
SoftwareSerial btport(D2, D3);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(38400);
  btport.begin(38400);
}

void loop() {
  if(Serial.available()){
    btport.write(Serial.read());
  }
  if(btport.available()){
    Serial.write(btport.read());
  }
}

But when I change the code to the following the serial monitor displays garbage values.
#include<SoftwareSerial.h>
SoftwareSerial btport(D2, D3);

int count = 0;
char data[200];
char c;
int flag = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(74880);
  btport.begin(38400);
}

void clearData(){
  int i = 0;
  while(i < 200){
    data[i] = '\0';
    //yield();
  }
  count = 0;
}

void loop() {
  clearData();
  btport.write("AT+INQ\r\n");
  delay(200);
  if(btport.available()){
    while(btport.available()){
      c = btport.read();
      data[count++] = c;
      data[count] = '\0';
    }
  }
  Serial.println(data);
}

The output of the above code is

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld

Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffe00 end: 3fffffc0 offset: 01b0
3fffffb0:  feefeffe feefeffe 3ffe84e4 40101289
<<<stack<<<
¢„*«P*V¡¡ET©«´¥T«ª«*¥u´U+UZªªUT¢üªTQT¥UQ©©jPªV©µuª¥…¢üZT¥(EŠª«ªQTEªj*QTE«ªUUªŠø/¥Å
Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffe00 end: 3fffffc0 offset: 01b0
3fffffb0:  feefeffe feefeffe 3ffe84e4 40101289
<<<stack<<<
¢„*«P*V¡¡ET©«´¥T«ª«*¥u´U+UZªªUT¢üªTQT¥UQ©©jPªV©µuª¥…¢üZT¥(EŠª«ªQTEªj*QTE«ªUUªŠø/¥Å

What should I do to solve this issue?

did you change the speed of the serial monitor as well?

@dandavis Yeah. I tried with different speeds. But didn't work.


text:
Send Arduino data to Database using ESP8266
My project is to receive data from Bluetooth (HC-05) sensor and storing it in the database. I have successfully received data from Bluetooth sensor and stored it in a String variable. Now i have to store this data to the database. I want to use the sensors as standalone (not connecting to the PC - operated on battery). Can I store the data to the database using ESP8266.

Since you mention you operate on a battery (standalone), what exactly do you mean by "the database"? Do you have online connectivity? Do you have any peripherals like an sdcard or other storage?
In case you don't have a permanent online connection, you would need to use some writable memory (like EEPROM) to store your data in some organized form. Since the ESP8266 doesn't seem to have any EEPROM built in, you would need to use its flash memory, like described in those answers.
A database could be as simple as a fixed length string list (essentially how string arrays look in memory). For example if the string data you want to save always has 32 bytes, you could just divide your available storage (e.g. 4096 bytes) to have a "database" wich can store 128 entries (4096/32). Your "database entries" will then be addressable in multiples of 32, you would find the 1st entry at byte 0, the 2nd at byte 32 and so on.
Once you are online, you could send the data out for further processing. Getting the data into a database can be as simple as a https request.

I am not using any memory. I am using Firebase as a database to store data. I have arduino uno, esp8266. I have created the project in firebase and copied the host name, key into the program. But when I try to upload the program to arduino I am receiving No such file or directory error for the following header files #include #include #include #include #include. I am following this link. How do i solve the issues.

Missing files most probably mean you didn't include a Library in your IDE. Check the comments in the link you've posted, the listed code looks a bit messed up, while not mentioning any #include<string> lines. Did you try the Examples directly from the firebase repository, or the much better library (from the linked electropeak source article)?


text:
Capture GRAYSCALE image with ESP32 Cam
For one of my projects, I would like to transfer a camera image with the best possible resolution and as many FPS as possible with the ESP32Cam.
For this I successfully used the code from
https://RandomNerdTutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/
A grayscale image would be enough for further processing, if it allows a higher speed.
Problem is, if I set the format to PIXFORMAT_GRAYSCALE, the ESP only outputs "Camera capture failed".
Are there any other settings to do?

I guess that 1 year later you shouldn't work on this anymore, but for every one that need the grayscale too, here my solution.
For reference I've found here that we can set  : s->set_special_effect(s, 2);
Where 2 is grayscale effect.
0 - No Effect
1 - Negative
2 - Grayscale
3 - Red Tint
4 - Green Tint
5 - Blue Tint
6 - Sepia
  // Camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }

  sensor_t * s = esp_camera_sensor_get();
  s->set_special_effect(s, 2); // 0 to 6 (0 - No Effect, 1 - Negative, 2 - Grayscale, 3 - Red Tint, 4 - Green Tint, 5 - Blue Tint, 6 - Sepia)

I just tried this with my ESP32Cam with no problems.  I would check that you are supplying enough power; I've definitely seen the 'Camera capture failed' when I had power issues.  Also, I would try a more recent tutorial on the ESP32Cam; the latest Expressif ESP32 Arduino libraries have AI Thinker ESP32Cam as a device choice.  I would try the CameraWebServer example in the ESP32 library and see if you still have the problem.


text:
How to separate a specific frequency signal from a summation of a few signals?
I want to calculate THD. SO how do I isolate the fundamental frequency from a signal with harmonics?
I have a signal V which is a sum of V1, V2 and V3. V1=A1sin(w1t+phi1), V2=A2sin(w2t+phi2) and V3=A3sin(w3t+phi3). I want to find out the magnitude/amplitude of a known frequency w1 in the signal. How do I proceed? Should I use the FFT library? If yes then how?

Though this is not really Arduino specific: Yes, I think you need to do an FFT on the signal. When googling something like "Arduino FFT" you get for example this library. It also has examples. You can use it, or program the FFT yourself. That would be a pure C/C++ programming question.

What are the values of the frequencies ω₁/2π...? To what precision are they known? Are they constant? How long does the signal last? Is it steady enough to allow you to measure V₁, V₂ and V₃ sequentially, rather than simultaneously? To what precision do you need the THD measurement?

@chrisl: He may not need an FFT. The FFT computes the amplitude of many frequencies. If the OP only needs three frequencies, the FFT is most likely overkill.

What exactly are you trying to do?  If you want to measure THD from an external signal, an Arduino is probably not the best choice.  It only has 10-bit ADCs and they are DC-coupled. You can build a simple circuit (https://www.daqarta.com/dw_rrll.htm) to shift an AC-coupled input to DC for the Arduino, but you will still have only 10-bit resolution.  I haven't looked deep enough into the library that chrisl mentions to see how big an FFT it can perform in the limited RAM of an Arduino, but I suspect the spectral resolution would be so poor as to be unhelpful for real-world THD measurements.
The way you describe the signal makes me think that this is an academic exercise, not a real-world problem.  If so, you don't need an Arduino or any other hardware, just run the FFT on your main computer.   If you do need to make real-world measurements, an ordinary sound card on your computer is a better way to go.  See https://www.daqarta.com/dw_0d0t.htm for an example.  The sound card approach has the added advantage that it can generate a low-distortion test signal to drive the device whose distortion you are trying to measure.  That allows a "trick" (called "Spectral Line Lock" in the example) to get even better resolution, by making the test signal synchronous with the sample rate so you don't need window functions.
If you really want to measure THD with an Arduino, consider an approach used in what used to be called a "wave analyzer".  The block diagram is shown here:
https://www.daqarta.com/dw_0h0p.htm.  This is essentially a one-spectral-line analyzer, which actually can be more selective than an FFT.  You basically multiply the input signal by the sine and cosine of the reference frequency (the fundamental) and then rectify and filter the results, and combine RMS-wise.  That gives you the fundamental value (or any individual harmonic you tune the reference to), so to get THD you divide by the RMS of the overall input signal.

The approach of the wave analyzer you describe is called “homodyne detection”. It can be used for real-time analysis of a signal on an Uno, if the sampling frequency and accuracy requirements are not too stringent.


text:
Arduino Wifi Rev2, bug when reading PWM duty cycle value on pin 6
I am trying to read the PWM duty cycle set for pin 6 on the Arduino Wifi Rev2.
By default, the timer used is TCB0, used in 8-bit PWM mode. The 16-bit Compare channel CCMP is used as two 8-bit registers, the lowest byte CCMPL is for the period, while the highest byte CCMPH is for the duty cycle.
However, something weird happens when I try to read the Compare channel register, the value of CCMPH is unexpecteadly copied into CCMPL.

// PWM on pin 6, timer TCB0
//TCB_t* timer_B0 = (TCB_t *)&TCB0; // pointer on timer structure

void setup() {
  pinMode(6, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  setPWMValueOnPin6(20);
  setPWMValueOnPin6(40);
  setPWMValueOnPin6(60);
  setPWMValueOnPin6(80);
}

void printCompareChannelValues()
{
  Serial.print("Compare channel = ");
  unsigned int r = TCB0_CCMP;
  //byte r = timer_B0->CCMP;
  Serial.println(r);

  Serial.print("Compare channel L = ");
  byte l = TCB0_CCMPL;
  //byte l = timer_B0->CCMPL;
  Serial.println(l);

  Serial.print("Compare channel H = ");
  byte h = TCB0_CCMPH;
  //byte h = timer_B0->CCMPH;
  Serial.println(h);
}

void setPWMValueOnPin6(byte value)
{
  analogWrite(6, value);
  printCompareChannelValues();
  delay(2000);
}

Here is the serial monitor output:
Compare channel = 5375
Compare channel L = 255
Compare channel H = 20
Compare channel = 10260
Compare channel L = 20
Compare channel H = 40
Compare channel = 15400
Compare channel L = 40
Compare channel H = 60
Compare channel = 20540
Compare channel L = 60
Compare channel H = 80
Compare channel = 5200
Compare channel L = 80
Compare channel H = 20
Compare channel = 10260
Compare channel L = 20
Compare channel H = 40
Compare channel = 15400
Compare channel L = 40
Compare channel H = 60
Compare channel = 20540
Compare channel L = 60
Compare channel H = 80
Compare channel = 5200
Compare channel L = 80
Compare channel H = 20

Problem occurs even when removing the serial functions (by watching at a led intensity on pin 6).
The same behavior occurs on pin 3 (timer TCB1).
Does someone has any idea what is going on? Thanks for your help.

Arguable bug location
The problem appears to be here in the analogWrite() code:
    timer_B->CCMPH = val;

I suppose it could be argued that you're using the timer in an way unintended
by the Arduino megaavr core, but I think it's reasonable to consider this as
a bug that should be fixed in the core.
16-bit hardware register access and analogWrite() internals
According to the "Accessing 16-Bit Registers" of the ATMega4809 datasheet (among others no doubt):

The AVR data bus has a width of eight bits, and so accessing 16-bit registers requires atomic operations. These
registers must be byte accessed using two read or write operations. 16-bit registers are connected to the 8-bit bus
and a temporary register using a 16-bit bus.
For a write operation, the low byte of the 16-bit register must be written before the high byte. The low byte is then
written into the temporary register. When the high byte of the 16-bit register is written, the temporary register is
copied into the low byte of the 16-bit register in the same clock cycle.
For a read operation, the low byte of the 16-bit register must be read before the high byte. When the low byte register
is read by the CPU, the high byte of the 16-bit register is copied into the temporary register in the same clock cycle as
the low byte is read. The high byte will now be read from the temporary register.
This ensures that the low and high bytes of 16-bit registers are always accessed simultaneously when reading or
writing the register.
Interrupts can corrupt the timed sequence if an interrupt is triggered and accesses the same 16-bit register during an
atomic 16-bit read/write operation. To prevent this, interrupts can be disabled when writing or reading 16-bit registers.
The temporary registers can be read and written directly from user software.

So in effect, timer_B->CCMPH = val; is not just writing the real CCMPH hardware register, it is also writing the real CCMPL register with whatever is in this anonymous temporary register that was filled by either the last read or write operation.
So here's what's happening in your code:

You execute byte l = TCB0_CCMPL; in printCompareChannelValues() which both reads TCB0_CCMPL and loads the temporary register with the real CCMPH register's value, which as you'll see is important.

You execute byte h = TCB0_CCMPH; which is reading the temporary register rather than the real CCMPH hardware register from which the temporary register was loaded in your read from TCB0_CCMPL above.  Note: technically this statement doesn't play a role in problem.  I'm mentioning it only to drive home the behaviour of the temporary register.

You exit printCompareChannelValues() and exit-and-reenter setPWMValueOnPin6() which calls analogWrite() which inside runs timer_B->CCMPH = val;,
which stores val in the real CCMPH with and stores the temporary register (containing the previous CCMPH value) into the real CCMPL.

So yeah, on each time through the previous CCMPH becomes the new CCMPL value.
Patching the core
Arguably what the core should contain, instead of  timer_B->CCMPH = val;, is something like:
{
    const uint8_t saved_SREG = SREG;
    cli();

    uint16_t temp  = timer_B->CCMP;
    temp          &= 0xFF;
    temp          |= (uint16_t)val << 8;
    timer_B->CCMP  = temp;

    SREG = saved_SREG;
}

Here we're doing full 16-bit register reads.  The load from CCMP reads the CCMPL first which primes the temporary register with the real CCMPH. Then the second half of the load from CCMP tries to read CCMPH, but is really  reading the temporary register correctly containing CCMPH's value.  And now there are no unpleasant surprises when this plays out in reverse.
The statement that assigns CCMP writes the CCMPL (really the temp register) then writes to the real CCMPH and simultaneously commits the temp register to the real CCMPL.
You can patch the above snipped over the timer_B->CCMPH = val; in your PATH-TO-ARDUINO15-DIRECTORY/packages/arduino/hardware/megaavr/CORE-VERSION/cores/arduino/wiring_analog.c
I have not spent a pile of time thinking about that patch, so use a bit of caution.  I may well have forgotten something important.
Priming the temporary register instead
If you don't want to mess with the core or you can't for some reason or another, a ugly hack would be to turn your simple analogWrite(6, value); call into something like the following:
{
  const uint8_t saved_SREG = SREG; cli();
  TCB0_CCMPL = TCB0_CCMPL;
  analogWrite(6, value);
  SREG = saved_SREG;
}

Besides turning off interrupt and then restoring them, the only thing happening here is this somewhat ridiculous looking statement:
TCB0_CCMPL = TCB0_CCMPL;
All this is doing is priming the temporary register for you.  On the right-hand side of the assignment we read the real CCMPL register.  This is also loading the temporary register with the real CCMPH, but we don't care about that.  Then on the left-hand side of the assignment, we attempt to write into CCMPL, but what we're in fact doing is writing to the temporary register.  And now your temporary register has the correct CCMPL value for when you run the timer_B->CCMPH = val; in the original analogWrite() code.
So, I suppose if you want to do this and you're unable/unwilling to modify your core, you could do this, potentially wrapping with an #if #else based on the Arduino megaavr core version, should they update the core in the future with patch given above or something equivalent.
Core patch using the same priming technique
The same priming technique could be applied inside the patch as follows.  This is maybe more confusing but slightly more efficient than the comparatively normal looking first patch.
{
    const uint8_t saved_SREG = SREG; cli();
    timer_B->CCMPL = timer_B->CCMPL; // Prime temporary register
    timer_B->CCMPH = val;
    SREG = saved_SREG;
}

Many thanks @timemage for this very detailed and great answer ! I really like the option of priming the temporary register. I would like to submit this bug to the Arduino team on github so that they take care about correcting the core, and give them the link to this page for patch reference. Are you ok with this?

Sure, you can try it.   Pretty sure I couldn't stop you even if I wanted. =)  For what it's worth it affects the "Nano Every" board as well.  Basically both of the only two boards currently in the arduino:megaavr package.

I submitted this as a bug to be fixed on Arduino github (github.com/arduino/ArduinoCore-megaavr/issues/91). I was asked to do a Pull Request. @timemage Would you be interested to do this PR for your proper attribution?

That is something that will take me a long time to research, decide, and do if that's what I decide.  In short, I don't know.  If you want to talk about it though you can find me on freenode under this name.

I am not on freenode, sorry @timemage. As I would really need this to be fixed, I think the core patch using the priming technique could be a first proposal for the PR, then discussion about what to do or to change could be done on github with the Arduino team.

Okay. Good luck with it.


text:
Is it possible my ATMega is burnt due to bad wiring?
While working on a project I tried sending data from my Arduino NANO to ATMega64 placed on AREXX Robot arm PCB via TXD/RXD. After plugging in VCC, GND, TXD and RXD to UART socket it didn't work so I figured the socket itself must be backwords or mirror image from my perspective. Then I tried plugging everything in on the other side of the socket and as I plugged VCC to one of the pins a little smoke came out (I can't specify exact place where smoke came from) and from now on there is no connection to the robot. However LEDs seem to work just like before the 'incident'. It can be seen as COM but, desktop app constantly displays 'Connection failed' when trying to access the robot. It seems that I plugged VCC to the MRESET pin and GND to the RXD1 pin of the ATMega64. Can anyone help define if my processor is burnt? And if so, what can I do to fix the robot? Are there any other ways to send data to ATMega considering it is already programmed adn I want to keep it that way? Unfotunately, replacing ATMega isn't possible for me. Thanks in advance for any help.
UART :

ATMega :

Robot PCB :

what does this mean? ... other side of the socket ....... which pin is this? ... I plugged VCC to one of the pins ... what is that pin connected to?

Yes, it's dead. You will have to learn to solder SMD components and replace the ATMega.

@jsotola just like I wrote, I plugged VCC to MRESET pin and GND to the ATMega's RXD1 pin.

@Majenko Even if LEDs like servo power LED or main power LED are on after turning on the robot?

Yes. It sounds like you burned out the RX pin of the MCU, which means no communication for you any more.

@FewArc I only read up to where you connected Vcc to an unspecified pin ... further reading is usually a waste of time ... why didn't you just say that you accidentally connected Vcc to MRESET and GND to RXD1 right at the begining of your post? ... the story about your project and about why you conected the cable backwards is irrelevant to the problem and just clutters up the post

You can touch (quickly at first) the components on your board to see what if any are unreasonably hot.  That will give you a strong indication of failure.  Lack of that doesn't tell you much though.

Smoke is a definite sign something failed. The LED (power indicator)is independent of the microprocessor, it just indicates power is applied in the appropriate direction.  Go to the basics, and load the simple blink sketch and see if it works, if so you are lucky. You then might want to write some code to check all the outputs and inputs. It is possible you destroyed both devices, you need to do some investigating to determine what is still properly operating.


text:
How to use ESP12F analog pin to read battery voltage?
I'm using an ESP12F microcontroller powered by a 3.7V battery.
What I want is to get actual information about the battery's state of charge. So to know when the battery needs to recharge.
To achieve this I created a voltage drop from 3.7V to 0.94V (because I read that ADC pin of esp12f operates between 0V - 1V) with 3k and 1k ohm resistors and connected the V out of the voltage drop to the ADC pin. But the analog read is constantly 1024 and doesn't change. When I drop voltage to 0.54V analog read is again 1024. I tried with second esp12f and the result is the same. When I try to read analog value from different components like a temperature sensor it all seems alright - analog value is ~500 and when temp rises the value goes up to ~650. I followed this article about how to read battery voltage but without success. I tried to do the same task with Arduino Uno instead of esp12f and everything works fine.
So based on these tests and observations, I think that there isn't a problem with the circuit because on Arduino Uno works fine, there isn't a problem with esp12f's ADC pin because with the temperature sensor the analog value is accurate.
To summarize: My problem is that the analog value from the battery is constantly 1024 and I can't get actual information about the battery's remaining voltage via esp12f.
In the image below is what my circuit looks like:

And this is the code of how I read the analog value:
const int analogPin = A0;
void setup()
{
    Serial.begin(115200);
}

void loop()
{
    int sensorValue = analogRead(analogPin);
    Serial.print("sensorValue: ");
    Serial.print(sensorValue);

    delay(1000);
}

First some off-topic notes: 1. Commonly you cannot conclude the charge of a rechargeable battery by its voltage. It has a reason why many battery management devices measure the current in and out the battery. 2. The sum resistance is quite low and presumably will discharge your battery more than the rest of your circuit. 3. You might want to add a capacitor in parallel to the low-end resistor to keep the voltage stable while the ADC samples.

Did you check the voltage at the ADC input with a multimeter? Make sure your voltage divider actually works correctly. You can use other voltage sources like a regulated power supply to vary the input voltage. -- Did you check that the selected pin is the same in hardware and software?

It is very odd that you have a measured voltage of 0.54 volts on A0, and still get a reading of 1024. What reading do you get if you take A0 to ground, and what do you get if you leave it floating?

Maximum operating voltage of an ESP8266 is 3.6v (read the datasheet), you can't connect a 3.7V directly to an ESP8266, not mentioned that when the battery is full charged, it could go up to 4.2V.

@hcheung, with a voltage regulator that downs the voltage to 3.3V the result with the reading is the same. I measured battery voltage with a multimeter and it's 3.8V.

@thebusybee, To measure the voltage that goes to ADC with a multimeter I placed + wire of the multimeter at the beginning of the 3k ohm resistor and the - of the multimeter between the two resistors and the output was 0.94V.

@Lee-xp, when A0 is connected to the ground reading is 0 and when I leave it floating reading again is 1024. Based on that is it possible that A0 pin doesn't receive any voltage when is connected to the V out of the voltage divider? But it will be strange because I measured with multimeter the V out value of the voltage divider and it shows 0.97V.

Since nothing seems to make sense here, is there a chance that you might be using something called _VCC build. Apparently '_VCC builds for ESP8266 will internally connect the analog port to the VCC pin of the ESP', though in such a case the output should not be stuck on 1024 - but it is a thought.

What happens if you replace the two resistors with a potentiometer - say a 10k? Then you could read the voltage on the pin when it is grounded (should be zero), and then slowly bring it up. It seems unlikely that the reading will suddenly jump from 0 to 1024. But if it does, the pin is behaving like a digital pin.

So you measured 0.94V across the 3kOhm resistor? This is not the voltage the MCU sees. It sees the voltage across the 1kOhm resistor: 3.8V - 0.94V = 2.86V... -- Please measure the voltage between ADC input and GND. This is what the MCU converts.

@thebusybee makes a good point. And this means that your 1k Ohm resistor is actually around 10K in value. It is very easy to mistake a red band for an orange band on a resistor body. This has got to be the solution surely?

@thebusybee, you were right! I swapped the resistors 1k ohm is the first and 3k ohm is the second. I measured the voltage between ADC pin and GND and now is 0.94V. The analog value I currently read is around ~940. I need to go back and read more about voltage dividers because this was a silly mistake of mine. My next steps will be to add resistors with bigger resistance so the battery won't discharge so fast and try to add a transistor too that will switch on the voltage divider only when I want to measure the battery voltage. Thank you very much both thebusybee and Lee-xp.

As you confirm in a comment, you swapped the resistors. So the ADC input received a voltage too high, and the ADC returned always the maximum value.
With this principle schematic we can calculate the appproximate voltage:

simulate this circuit – Schematic created using CircuitLab
You used R1 = 1kΩ and R2 = 3kΩ, this gives V_ADC = 3.7V *  R2 / (R1 + R2) = 3.7V * 3kΩ / (1kΩ + 3kΩ) = about 2,8V.
With the correct values of R1 = 3kΩ and R2 = 1kΩ it is V_ADC = 3.7V *  R2 / (R1 + R2) = 3.7V * 1kΩ / (3kΩ + 1kΩ) = about 0.9V.


text:
Removing the L from F_CPU in assembly
I am developing a mixed c++ /asm project.
In the asm I am using F_CPU to do some busy waiting as follows. However, by default, the F_CPU is defined with a trailing L (for long). The asm is not able to cope with the L. I can fix this by manually defining a new define in the asm,  but that's a pretty dirty solution. What's the correct way to fix this?
.macro _delay_1u
.rept (F_CPU/1000000)
nop
.endr
.endm

Welcome to SE/Arduino! As a regular user of this network, you know how these sites work. Unfortunately, your issue does not seem to be about Arduino, I suggest to read "[ask]". Please clarify the relation, and while you're at it, add the compiler and assembler versions you are using. (Disclaimer: I did not vote down.)

Thanks for your comment. If I am not mistaken,  F_CPU is a define provided by the Arduino environment.

Actually, it is a standard macro for avrgcc/avrlibc and not specific to Arduino. If that is your issue's only connection to Arduino, you might want to ask on [so] instead. It looks as an general GNU assembler question, which AFAIK does not accept suffices on integer literals.

That is indeed the culprit. Since pretty much any single arduino project defines F_CPU, I hoped it was a commonly encountered problem. I did not find any answers googling, though. Probably having time critical sections written in asm is less common than one would imagine.

You have an XY problem: You want to busy-wait some cycles depending on the system's clock frequency. You think you can realize that with (inline) assembly and a repetition macro. But as you found, the assembler does not accept C literals with suffixes, as it has no usage for the type information.
However, this is a possible solution to do busy-wait in C++: built-in functions of the compiler. In this case you want to use __builtin_avr_delay_cycles().
This simple sketch shows the effectively generated machine code. It contains some calls of digitalWrite() to separate the different delays.
void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  // delay 1us
  __builtin_avr_delay_cycles(F_CPU / 1000000UL);
  digitalWrite(LED_BUILTIN, LOW);
  // delay 1 cycle
  __builtin_avr_delay_cycles(1UL);
  digitalWrite(LED_BUILTIN, HIGH);
  // delay 10 cycles
  __builtin_avr_delay_cycles(10UL);
  digitalWrite(LED_BUILTIN, LOW);
  // delay 100 cycles
  __builtin_avr_delay_cycles(100UL);
}

Commonly you will not have access to the intermediately generated files, because the IDE uploads the resulting machine code directly to the target. However, as long as the IDE is running, you can access the files from some temporary location. In my case, this is the path "/tmp/arduino_build_119348", and I copied the linked sketch to save it. It is an ELF file named "test.ino.elf".
The tool "avr-objdump" (exists in your Arduino IDE installation) disassembles the binary code of loop() for further investigation:
avr-objdump -d test.ino.elf

If you want, you can redirect the output into a file.
The relevant part is this quite at the end:
 2c4:   81 e0           ldi r24, 0x01   ; 1
 2c6:   0e 94 70 00     call    0xe0    ; 0xe0 <digitalWrite.constprop.0>
 2ca:   85 e0           ldi r24, 0x05   ; 5
 2cc:   8a 95           dec r24
 2ce:   f1 f7           brne    .-4         ; 0x2cc <main+0xc8>
 2d0:   00 00           nop
 2d2:   80 e0           ldi r24, 0x00   ; 0
 2d4:   0e 94 70 00     call    0xe0    ; 0xe0 <digitalWrite.constprop.0>
 2d8:   00 00           nop
 2da:   81 e0           ldi r24, 0x01   ; 1
 2dc:   0e 94 70 00     call    0xe0    ; 0xe0 <digitalWrite.constprop.0>
 2e0:   83 e0           ldi r24, 0x03   ; 3
 2e2:   8a 95           dec r24
 2e4:   f1 f7           brne    .-4         ; 0x2e2 <main+0xde>
 2e6:   00 00           nop
 2e8:   80 e0           ldi r24, 0x00   ; 0
 2ea:   0e 94 70 00     call    0xe0    ; 0xe0 <digitalWrite.constprop.0>
 2ee:   81 e2           ldi r24, 0x21   ; 33
 2f0:   8a 95           dec r24
 2f2:   f1 f7           brne    .-4         ; 0x2f0 <main+0xec>
 2f4:   00 00           nop

The different delays are clearly visible. The following parts have the number of cycles in parentheses.
Since the system's clock of my chosen target is 16 MHz, the delay of 1us needs to wait 16 cycles:
 2ca:   85 e0           ldi r24, 0x05   ; (1)
 2cc:   8a 95           dec r24         ; (1)
 2ce:   f1 f7           brne    .-4     ; (1 if not taken, 2 if taken)
 2d0:   00 00           nop             ; (1)

We have nCycles = 1 + 4 * (1 + 2) + 1 + 1 + 1 = 16.
To delay 1 cycle, the compilers inserts exactly one nop:
 2d8:   00 00           nop

To delay more cycles, a loop is used, as before. This is the delay of 10 cycles:
 2e0:   83 e0           ldi r24, 0x03   ; (1)
 2e2:   8a 95           dec r24         ; (1)
 2e4:   f1 f7           brne    .-4     ; (1 if not taken, 2 if taken)
 2e6:   00 00           nop             ; (1)

We have nCycles = 1 + 2 * (1 + 2) + 1 + 1 + 1 = 10.
And the delay of 100 cycles is:
 2ee:   81 e2           ldi r24, 0x21   ; (1)
 2f0:   8a 95           dec r24         ; (1)
 2f2:   f1 f7           brne    .-4     ; (1 if not taken, 2 if taken)
 2f4:   00 00           nop             ; (1)

We have nCycles = 1 + 32 * (1 + 2) + 1 + 1 + 1 = 100.

Just as a complement to the busybee's answer: the avr-libc provides the
macros _delay_ms() and _delay_us() for busy-wait delays.
Internally, they use __builtin_avr_delay_cycles() and F_CPU to
provide the required number of delay cycles. For example, on an Uno,
_delay_us(0.25);  // delay for 0.25 µs

compiles to
rjmp .  ; 2 cycles
rjmp .  ; 2 cycles

which takes exactly 0.25 µs (4 cycles at 16 MHz) and takes
less code space than four nops.

A really preferable solution! In one place I do not find again, I remember a minimum delay like 3 µs. I might have been hallucinating but I'm not an AI. :-D


text:
Trying to control DC motor speed with PID
i'm trying to control a DC motor with PID. I have already made a code where i control the motor with an ultrasonic sensor (for distance) but now i need to run the motor at a given RPM (the Output). I did a lot of resarch and found that i will have to use the PID Library. But with my existing code i'm not sure if it's going to work. I know that i will have to modify PWM values by the Input on the analogWrite(). Can you enlight me on this PID? Here is my code:
int enableBridgePin = 10;
int forwardPin = 11;
int backWardPin = 9;
int tickPin = 2;
const int trig = 5;
const int echo = 6;

int dt;
int distance;

void setup() {
  pinMode(enableBridgePin, OUTPUT);
  pinMode(forwardPin, OUTPUT);
  pinMode(backWardPin, OUTPUT);
  pinMode(trig, OUTPUT);
  pinMode(echo, INPUT);
  Serial.begin(9600);

  digitalWrite(forwardPin, LOW);
  digitalWrite(backWardPin, LOW);

  digitalWrite(enableBridgePin, HIGH);
}

void loop() {
  analogWrite(enableBridgePin,255);

  digitalWrite(forwardPin, HIGH);
  digitalWrite(backWardPin, LOW);
  Serial.println(distancefonction(dt,distance));

  if (distancefonction(dt,distance)<15 && distancefonction(dt,distance)>7){
    slowdown();}
}

int distancefonction(int dt, int distance) //function to show distance

void slowdown(){
  for(int i=255;i>=0;--i){
      analogWrite(enableBridgePin,i);
      delay(10);}
   Serial.println("SLOWDOWN");
}

PID is a feedback loop control. So you first need feedback from the motor, e.g. some way to measure the actual speed/RPM of the motor. Only then you can use PID.

Does your  PWM analogWrite(enableBridgePin,i); work as desired ?  ( A minimal but complete and compilable code is appreciated :)

@chrisl the motor returns the tickPin

@DataFiddler yes the pwm works properly i tried it.

What does the motor with trickPin? You haven't explained this, nor do I see anything in your code. Are you already reading the current RPM back from the motor, or is this be actual problem?

@chrisl I can't read RPM on the motor. The tickPin is actually a timer pin connected to channel A (motor with encoder), i think everytime there is an impulsion the timer increments (i'm not sure abt that)

Is the "tickPin" a tachometer signal?

PID- or any similar control needs

set point
actual value
controlling variable (your PWM value)

The difference between set point and actual variable and its change over time are combined to calculate the controlling variable in order to minimize that difference.
Control theory in general is too complex to answer the "how to" here in general.
Besides measuring the actual value you also need knowledge about the behavior of your system: e.g. If you change the PWM value from 50 to 100, how much and how quick will the motor speed change? Even the response form over time will affect the optimal parameters for your control loop. It's called (feedback) loop because any change of the PWM value will change that difference and lead to a different new value of the controlling PWM value again (Allowing for instable behavior in case of bad controlling parameters).
Getting the actual value is your first task. How your distancefonction affects the desired value (set point) might also need more clarification...

thanks for the explanation. Actually 'distancefonction' just displays the distance between the object and the sensor. what i don't understand is how i'll get the actual value? the setpoint is 100rpm

One of the simpler ways is a optical wheel, or even just a small 'flag', attached the motor shaft, that interrupts a light beam every revolution (or part of one). Time the pulses and convert to RPM.


text:
Need advice on serial bytes reading optimization
I am doing some device serial data read and publishing values to MQTT. Using ESP8266 for this.
Currenty I request serial device by sending a command and parse all byte values individually, how to do this in better way ?
each byte parse is done in such way:
float Heat = (float)data[38];

  sprintf(mqtt_topic, "%s/%s", mqtt_topic_base, "Temp"); mqtt_client.publish(mqtt_topic, String(Temp).c_str());

float Power = (float)data[39];
......
..... and etc...

In principle it is ok to use your way, but a simple improvement is to change the magic numbers (38, 39) to constants or define:
const int offset_heat = 38;

…

float Heat = (float)data[offset_heat];

or a define:
#define OFFSET_HEAT 38

…

float Heat = (float)data[OFFSET_HEAT];

If all values are consecutive you can keep a variable to read the values:
int offset = 38; // Normally starts at 0 assuming you read values from the start

float heat = (float) readByte(&offset);

…

int readByte(uint8_t* offset)
{
    int value = data[*offset];
    (*offset)++;
    return value;
}

This increases the offset after reading the value.
Some remarks:

It's a convention not to use capitals for local variables (so change Heat to heat)
You don't use the Heat variable in sprintf, maybe this is intentional.

sorry in sprintf I didnt changed on this exaple, misstake from me :)

No problem, for the solution it doesn't change


text:
Lolin D32 Pro board with OLED SH1106
Just starting a project and wanting to connect Lolin D32 Pro board with OLED SH1106. The screeen works with my Arduino Nano no problem however I can't seem to get it working on the D32 Pro.
I tried different pins on the D32 and different libraries, no luck.
My code example is below and I connect pin 21 of D32 board to the sda pin of the screen and pin 22 of the d32 board to the scl pin of the screen. VCC & GND also are connected correspondingly
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SH1106.h>

#define OLED_SDA 21
#define OLED_SCL 22

Adafruit_SH1106 display(21, 22);

void setup()   {
  Serial.begin(115200);
  Serial.println("setup");
  /* initialize OLED with I2C address 0x3C */
  display.begin(SH1106_SWITCHCAPVCC, 0x3C);
  Serial.println("begin");
  display.clearDisplay();
  Serial.println("clear");

}
void loop() {
    Serial.println("loop");

  /* set text size, color, cursor position,
  set buffer with  Hello world and show off*/
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Hello, world!");
  display.display();
  delay(2000);
  display.clearDisplay();
}

Please help me out with the code example or something to read. I suspect I am missing something around D32 Pro board pins


text:
Arduino Library to make http post request with bearer authentication
I want to make an Http Post request with Bearer Authentication to my api using my Arduino Mkr Wifi 1010, but I couldn't find the appropriate library to do something like this (code generated with one made with Postman):
    POST /api/v1/rilevamento/transaction/commit HTTP/1.1
Host: www.....:8082
Authorization: Bearer eyJhb.......
Content-Type: application/json
Content-Length: 233

{
    "id": 0,
    "dispositivo": "sesto",
    "nomeutente": "MyName",
    "cognomeutente": "MySurname",
    "mailutente": "name@email.it",
    "data": "2020-11-23T09:23:03.142+00:00",
    "temperatura": 37.5
}

Can you tell me where to find this library? I tried WifiNiNa httpClient, ArduinoHttpClient, HTTPClient and other but I couldn't  get any response or even enter in the method of my api on debug.

The "Authorization" is simply an HTTP header.  So add it in your request like:
http.addHeader("Authorization", token);

The value of "token" is just the string "Bearer " followed by your authorization string.  Don't neglect the SPACE after the word "Bearer".  It will look like:

"Bearer eyJhb......"

On the Arduino MKR WiFi 1010 you use the WiFiNINA library which is slightly different.  Here is some example code:
  if (client.connect(server, 80)) {
    client.println("POST /test/post.php HTTP/1.1");
    client.println("Host: www.targetserver.com");
    client.println(authorizationHeader);
    client.println("Content-Type: application/x-www-form-urlencoded");
    client.print("Content-Length: ");
    client.println(postData.length());
    client.println();
    client.print(postData);
  }

The variable authorizationHeader will have the "Authorization: Bearer xxxxx...." authorization string.
Or you can replace the client.println(authorizationHeader); by:
client.print("Authorization: Bearer ");
client.print(token);

to avoid dealing with concatenations, etc.
client can be an instance of WiFiSSLClient which works with both WiFi101 and WiFiNINA.

I believe this is made with HTTPClient which is for ESP modules, can I use it with my MKR Wifi?

With the MKR WiFi 1010 you use the WiFiNINA library which is slightly different.  I've updated my answer with the relevant details.


text:
Arduino Leonardo - Setting up bluetooth - AT command from terminal does not return anything
I am trying to setup bluetooth with a board that contains Arduino Leonardo chip.
My full setup is:
The main board: https://www.dfrobot.com/product-1148.html
The base shield: https://coolcomponents.co.uk/products/grove-base-shield-for-arduino-v2
The bluetooth module: https://wiki.seeedstudio.com/Grove-Serial_Bluetooth_v3.0/
The bluetooth module is connected to D8 port of the base shield.
The reason is "not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI)." as explained here: https://www.arduino.cc/en/Reference/SoftwareSerial
Here is the full code.
#include <SoftwareSerial.h>   //Software Serial Port

/*Connect your Bluetooth Module to D8 otherwise it will not work due to Arduino Leonardo */

#define RxD         8
#define TxD         9

SoftwareSerial blue(RxD,TxD);

void setup()
{
    Serial.begin(9600);
    blue.begin(9600); //anything other than 9600 will not work

    // wait for serial port to connect. Needed for native USB
    while(!Serial){
    ;
    }

    pinMode(RxD, INPUT);
    pinMode(TxD, OUTPUT);

    Serial.print("Started\n");
    setupBlueToothConnection();

}

void loop() {
char recvChar;
    while(1)
    {
        if(blue.available())
        {//check if there's any data sent from the remote bluetooth shield
            recvChar = blue.read();
            Serial.print(recvChar);

        }
        if(Serial.available())
        {//check if there's any data sent from t he local serial terminal, you can add the other applications here
            recvChar  = Serial.read();
            blue.print(recvChar);
            delay(400);
        }
    }
}

void setupBlueToothConnection()
{
  //blue.begin(9600);

  blue.print("AT");
  delay(400);

  blue.print("AT+ROLES");  // set the role as slave
  delay(400);

  blue.print("AT+NAMESlave");   // set the bluetooth name as "Slave" ,the length of bluetooth name must less than 12 characters.
  delay(400);

  blue.print("AT+AUTH1");
  delay(400);
  blue.flush();
}

The output from the Serial Monitor (set as BOTH NL & CR, 9600) as follows:
Started
OKOK+Set:SOK+Set:SlaveOK+Set:1

The problem is when I send AT commands from terminal I get nothing in return.
However if I send AT command from the IDE, I am getting feedback from the bluetooth.

get rid of the almost 1/2 second delay in loop() .... also get rid of the while(1) ... loop() is already a while(1)

why do you use SoftwareSerial and not Serial1? use Serial.write(recvChar);. maybe you don't send a line end character to terminate the command

@jsotola - I will need two while loops that is why I left it like that. Reducing it 1 loop and removing delay did not fix the issue. I will be also adding a Zigbee module that is why I used software serial. I have also tried with "Serial1" but nothing changed. Just to clarify - sending AT command via code works such as "Serial1.print("AT"), however if I send it from Serial Monitor nothing returns.

I was going to ask you what exactly you're sending from the terminal, specifically what line termination. But now I see you have no termination on your AT commands in setupBlueToothConnection.  Is this really the code you're testing with?

Yes @timemage it is the exact same code that I am testing.

The issue is fixed.
Note: This is the version includes Serial1 rather than SoftwareSerial. The rest is the same.
Serial.read()

Returns the first byte of incoming serial data available.

So, when I send AT command from terminal, it does send "A" and then "T" rather than "AT" as a string which Bluetooth expects as stated in the product's documentation:

AT Command format: Uppercase AT command format. string format, without any other symbol. (e.g. \r or \n).

Hence, I have added the following function:
String SerialString() {   // Function to generate string from chars sent via Serial Monitor

  String inputString = "";  // to hold the string

  while (Serial.available()) {

    char inputChar = (char)Serial.read(); // get the new byte:
    inputString += inputChar;             // add it to the inputString:
    }

    return inputString;     // returns completed string
}

Then inside void loop():
String WholeCommand = "";
if(Serial.available() > 0){
    WholeCommand = SerialString();
    Serial1.print(WholeCommand);
  }

Now, when I send AT from Serial Monitor, I can get OK from Bluetooth.

This is bizarre to me.  Normally when devices accept AT-commands they will give you all the time in the world to complete the command and completing it means sending '\r'.  I wonder if there isn't a setting that will make this thing behave in a normal way.

I definitely agree your point, this is why I struggled. However in their documentation: link this is how they state it.

I found the reference "Uppercase AT command format. string format, without any other symbol. (e.g. \r or \n)."  For future readers you might put that quote and the datasheet link into your answer.  If it were me, I'd toss this thing and get a different module though.

Included them as you suggested. Unfortunately these are bought in bulk, so I need to figure out the best way to utilise them.

Yeah I understand.  It's good that your question/answer exists and can be found and understood regardless.


text:
SSD1306 i2c OLED display - not able to show images properly
So I am using this 0.96" i2c yellow/blue OLED display: https://www.makerhero.com/produto/display-oled-0-96-i2c-azul-amarelo/ and an Arduino UNO clone. I have generated an image using this site https://javl.github.io/image2cpp/ and adapted the sketch below from the Adafruit official example in the Arduino IDE (ssd1306_168x64_i2c.ino)
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET -1
Adafruit_SSD1306 display(OLED_RESET);

#define LOGO16_GLCD_HEIGHT 44
#define LOGO16_GLCD_WIDTH  50
static const unsigned char PROGMEM drawing[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0xc0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0xc0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x03, 0xc0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x03, 0xc0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0xe0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0xff, 0xff, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xff, 0xff, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x7f, 0xff, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x3f, 0xfc, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1f, 0xf8, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1f, 0xf8, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1f, 0xf8, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x1f, 0xf8, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x1f, 0x7c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x3c, 0x1c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x38, 0x1c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x40, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

void setup() {
  // put your setup code here, to run once:
  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)
  // init done

  // Show image buffer on the display hardware.
  // Since the buffer is intialized with an Adafruit splashscreen
  // internally, this will display the splashscreen.
  display.display();
  delay(2000);

  // Clear the buffer.
  display.clearDisplay();

}

void loop() {

  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0,0);
  display.println("Botafogo");
  // put your main code here, to run repeatedly:
  display.clearDisplay();

  // miniature bitmap display
  display.drawBitmap(0, 10,  drawing, 128, 50, 1);
  display.display();
  delay(2000);

}

The image I am obtaining (and have tried other images with similar results) is below, it gets trimmed in its lower part (it is supposed to be a full star, a soccer team crest).

The intended image is this one:

So what am I doing wrong or missing?

Looks like the problem is in the size.  It's not fitting to this display. Try to resize the image and make it smaller. I faced similar problems and resized the images.

the image looks interlaced with blank rows ... try running example code

Change this line:
Adafruit_SSD1306 display(OLED_RESET);

to
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RESET);

The problem is not that you were sold a 32 row display labeled as 64 row. You just aren't configured for the 64 row display that you actually have. The pixels are pretty much always square on these displays. An actual 32-row display will look roughly like the top-half of your display.
Without being explicitly during construction of the display object, the Adafruit library assumes displays configured for I2C address 0x3C are 32 row and those with I2C address 0x3D are 64 row. However the configured driver I2C address and row are not strictly related. They're just guessing incorrectly for you. SSD1306 with 64 rows where the driver is configured for I2C address 0x3C are just not uncommon. Adafruit probably choose this attempted at auto-detection based on what they themselves had configured their displays for or whatever was most common in the wild at the time they wrote library.
As shown above, you can be explicit about row count, overriding their guessing. When you specify the correct row count manually will see the entire image without the unused rows between used ones that are present in both your question and own answer. And this is done without resizing the image content.
Here is a XIAO Expansion board that provides a 64 row display but configured 0x3C running. It is your code unmodified on the left and your code with only the constructor changed on the right:

Your display, like the one I've shown on the XIAO expansion board, just happens to violate Adafruit's default assumption/guess by using I2c address 0x3C and 64 rows.
I go over some of this here where someone was attempting to instruct the library to change screen resolution but not in a correct way.

Thank you. It is the first time in the 'exchange network that someone gives me a clear and concise anser without destroying or humiliating me.


text:
ESP-C3 Super mini MAX98357A and SD Card Reader together
After a lot of research and minimum results about pin mapping and particular specific configurations for SPI and I2S on ESP-C3, i about to give up on this.
I have recently bought ESP32-C3 Supermini because of its size and versatility, but i'm facing some trouble to make my code work correctly.

WHen i try to start I2S to initialise my MAX98357A, my SD card stop reading files.
What i have for now:
//    SD Card
#define SD_SCK 1
#define SD_MISO 0
#define SD_MOSI 4
#define SD_SS 5                  // Chip Select

//    I2S
#define I2S_DOUT 6  // GPIO2 (DIN) 2
#define I2S_BCLK 7  // GPIO21 (BCLK) 21
#define I2S_LRC  8  // GPIO3 (LRC) 3
#define I2S_NUM       0          // i2s port number

SPIClass spi(FSPI); //HSPI FSPI

 static const i2s_config_t i2s_config =
      {
          .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_TX),
          .sample_rate = 44100,                                 // Note, all files must be this
          .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT,
          .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
          .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),
          .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,             // high interrupt priority
          .dma_buf_count = 8,                                   // 8 buffers
          .dma_buf_len = 256,                                   // 256 bytes per buffer, so 2K of buffer space
          .use_apll=0,
          .tx_desc_auto_clear= true,
          .fixed_mclk=-1
      };

      // These are the physical wiring connections to our I2S decoder board/chip from the esp32, there are other connections
      // required for the chips mentioned at the top (but not to the ESP32), please visit the page mentioned at the top for
      // further information regarding these other connections.

      static const i2s_pin_config_t pin_config =
      {
          .bck_io_num = I2S_BCLK,                           // The bit clock connectiom, goes to pin 27 of ESP32
          .ws_io_num = I2S_LRC,                             // Word select, also known as word select or left right clock
          .data_out_num = I2S_DOUT,                         // Data out from the ESP32, connect to DIN on 38357A
          .data_in_num = I2S_PIN_NO_CHANGE                  // we are not interested in I2S data into the ESP32
      };

void setup() {
    spi.begin(SD_SCK, SD_MISO, SD_MOSI, SD_SS);
    pinMode(SD_SS, OUTPUT);
    digitalWrite(SD_SS, HIGH); // SD card chips select, must use GPIO 5 (ESP32 SS)
    if(!SD.begin(SD_SS, spi))//SD_CS
    {
        Serial.println("Error starting SD!");
        while(true);
    }

    // SD Card fully works here

    i2s_driver_install(i2s_num, &i2s_config, 0, NULL);
    i2s_set_pin(i2s_num, &pin_config);

    // ...and now i just cant open files and directories anymore.

}

what i'm missing here?

Well, you may be confused about pin numbering schemes. But it's difficult to tell in what exact way. It would help to clearly see what your actual wiring is. If this code is (or is based on) an example a link to that may help.

this code is purely extracted from an example with different pins oon it., (the SD part) the I2S part is another code combined on it.
I achieved that pins configuration on trial and error.  and researching about behave of ESP32-C3 info on foruns across the internet.  but there is a lot of confusing information about pins and behave of them on C3 super mini.
So the physical wiring configuration is representated by what is in the code.

What exactly your chose as the board selection on your Arduino IDE (tools->board)? The pinmap picture you shown is for SeeedStudio XIAO-C3, so unless you had a XIAO-C3, supermini available in the market uses Espressif default C3 pin assignments. AND your code neither conforms to XIAO nor to Espressif C3 pinmap. So please clarify and provide your connection diagram...

The GPIO pins (marked green on your picture) match the GPIO pinout of the Superminis I have. In anycase, these are printed on the back silk screen.  You will compile using the ESP32C3 dev Module so you must look look at that board to match functions to GPIO pins. See https://mischianti.org/esp32-c3-devkitc-02-high-resolution-pinout-and-specs/. The comment about a fixed GPIO 5 seems strange and is probably intended for another board since SS is GPIO 7 by default on an ESP32C3.  Which ESP32 Arduino core are you using 2.x or 3.x. If 3.x try the latest 2.x instead.


text:
How to connect two arduinos with smartphone wirelessly
I'm working on a project that have two separate setups for Arduino, each Arduino read sensors and send data to smartphone. how to connect two Arduino then send all data to smartphone over Bluetooth?

Do you really want to use bluetooth, or is that just a idea? Should the two Arduinos connected with each other, or just each one with the phone? If the first, should this also be wireless?

Yes I want to use Bluetooth to connect Arduino with the smartphone, I want to use nrf24 module to connect two Arduino and send all data to the smartphone with HC-06 Bluetooth module, but I need a guide for connection and code.

Then please describe, what exactly your problem is. There are lots of tutorials about these on the web, so we need to know, how you can help you better, than they can.

The internet is full of information, mate. If you have a precise question we may help you with more acuracy


text:
Bitwise write to analog PIN
I am just starting to learn bitwise operands and here is my question. To do this:
pinMode (13, OUTPUT);
digitalWrite (13, HIGH);

bitwise I can do like this:
DDRB |= B00100000;   //set PIN13 as OUTPUT
PORTB |= B00100000;  //set PIN13 HIGH

but how I can do this:
analogWrite(9, 200);

I know how to convert DEC numbers to BIN, but how to send this number to PWM PIN? I cannot find any good example in web..
Thank you!

AnalogWrite is a wrapper that hides complexity from you. You will have to configure on of those Timer/Counter to do PWM and set multiple registers accordingly.

Thank you! Have you got any material where to read more about it and how to do it?

Note, you haven't specified, which Arduino you are using. I'm assuming a Atmega328p based Arduino (Uno, Nano, Mini) here, though the principle works with every AVR microcontroller, that has this hardware).
With analogWrite() are are not sending data bitwise out of a pin. It configures the hardware Timer for setting that pin at a specific frequency and with a specific duty cycle. So analogWrite() actives a totally different piece of hardware inside the microcontroller.
To do this without the Arduino function analogWrite(), you first need to decide, which way to go:

You can generate an interrupt through the hardware Timer and then set the wanted pin by software inside the ISR (which gives you free choice of the pin, but also introduces some jitter in the signal)
or you can let the hardware Timer itself toggle the pin, which does not involve any software for running (that means you can only use one of the 2 pins, that are associated with the corresponding Timer, but you will get a much more stable signal)

There are lots of tutorials on the web on how to do that. A search for "arduino timer register pwm" gave me some promising results, for example this one, where they explain, how to get PWM with the Timer1 registers and a free to choose frequency. (That is a 3 part series, one part for each Timer. Part 1 for Timer 0 is here, though you might want to keep Timer 0 as it is, so that functions like delay() and millis() still work as normal). There are also many such questions on this site, for example this one.
Another very important source for anything hardware related is the datasheet of the corresponding microcontroller. For the Uno, Nano or Mini that is the Atmega328p, which datasheet can be found on the microchip site here (or when googling for the microcontroller name)

I am sorry - I am using Nano..

@wotesi Then all the links, that I've included, apply to your Arduino. The Nano also uses the Atmega328p

Great! Thank you very much!


text:
Merging two 2-d arrays in order of axes
Looking to merge two different 2D arrays of different row sizes into one long array:
 int 2dArray1[][] = {
   {1, 2, 3},
   {4, 5, 6}};
 int 2dArray2[][] = {
   {10, 20},
   {30, 40}};
 int 1dLongArray[10];

This is where I need help in order to have the values of 1dLongarray be arranged as follows:
1, 2, 3, 10, 20, 4, 5, 6, 30, 40

How would I achieve this? Thanks in advance.

step by step, how did you do it on paper? ... the program would do it the same way

The only way that I could think to make it work on paper would be to use memcpy for a one dimensional arrays and then create a two dimensional array out of it somehow. I'm not really sure how to do that, and I'm fairly new to coding and don't have a tutor or instructor to help me. I always try to do my best to find an answer myself before asking online but this one had me stumped.

when i say on paper, i mean, how would you do it if you knew nothing about programming ... what sequence of steps would you follow? ... i also do not mean write down first three numbers ... i mean baby steps, like look at array1, row1, position1.  copy content to first empty position at destination

Consider using loops of length specific to the desired number of transactions.  For example, using this pseudo code create a sketch which follows this pattern:
initialize i to zero
loop 2 times for each row using the variable x
  loop 3 times for each element in first array using the variable y
    long array [i] = first array[x][y]
    increment i
  loop 2 times for each element in a second array using the variable z
    long array [i] = second array[x][z]
    increment i

Being a brand new account I can't upvote your comment yet, so I'm leaving this comment to thank you!

If you can derive a working solution from this answer, you should be able to accept this answer as a solution to your question.

Thanks @Hitachii for making the answer as correct.  If the answer works great!  If not, please leave a comment and I'll edit the answer to improve it.

Sure. If someone were to plug the guideline for the formula that you posted, into the problem that I posted, for "long array [i] = first array [y] [x]" and "long array [i] = second array [z][x], they would have to switch the placement of x and z/y in their respective line to look like "long array [i] = first array [x][y]" to follow the original sequence of the array.
Do I post my working code? This shows how green I am to this platform.

You are correct.  The 1st argument is the row and the second is the column.  I'll change my answer.


text:
GPS6MV2 not showing properly
Hi I'm new to Arduino (I have an ELEGOO R3 UNO board). I want to receive location from a GPS6MV2 module, but it seems to be failing somewhere in my code, or in other part.
This is my code (copied from github to check if GPS6MV2 is working):
#include <TinyGPS++.h>                           //get library here > http://arduiniana.org/libraries/tinygpsplus/
TinyGPSPlus gps;                                 //create the TinyGPS++ object

#define RX A3                                    //pin number for GPS RX input into Arduino - TX from GPS
#define TX A2                                    //pin number for GPS TX output from Arduino- RX into GPS

#include <SoftwareSerial.h>
SoftwareSerial GPSserial(11, 10);//(RX, TX) check correct pin in ELEGOO board assignments.

float GPSLat;                                     //Latitude from GPS
float GPSLon;                                     //Longitude from GPS
float GPSAlt;                                     //Altitude from GPS
uint8_t GPSSats;                                  //number of GPS satellites in use
uint32_t GPSHdop;                                 //HDOP from GPS
uint32_t GPSstarttimemS;                          //time in mS when GPS is scanned fo fix
uint32_t GPSendtimemS;                            //time in mS when GPS got a fix

void loop()
{
  gpsWaitFix();
  displayGPSfix();
}

void gpsWaitFix()
{
  //waits till the GPS gets an updated fix

  uint8_t GPSchar;

  Serial.println(F("Wait for updated GPS Fix"));
  GPSstarttimemS = millis();

  while (1)
  {
    if (GPSserial.available() > 0)
    {
      GPSchar = GPSserial.read();
      gps.encode(GPSchar);
      Serial.println(GPSchar);
    }

    if (gps.location.isUpdated() && gps.altitude.isUpdated())
    {
      GPSendtimemS = millis();
      Serial.println("UPDATED");
      break;
    }
  }
}

void displayGPSfix()
{
  float tempfloat;

  Serial.println();
  Serial.println();
  Serial.println(F("New GPS Fix "));
  Serial.println(GPSendtimemS - GPSstarttimemS);
  Serial.println(F("mS  "));

  GPSLat = gps.location.lat();
  GPSLon = gps.location.lng();
  GPSAlt = gps.altitude.meters();
  GPSSats = gps.satellites.value();
  GPSHdop = gps.hdop.value();
  tempfloat = ( (float) GPSHdop / 100);

  Serial.println(F("Lat,"));
  Serial.println(GPSLat, 6);
  Serial.println(F(",Lon,"));
  Serial.println(GPSLon, 6);
  Serial.println(F(",Alt,"));
  Serial.println(GPSAlt, 1);
  Serial.println(F("m,Sats,"));
  Serial.println(GPSSats);
  Serial.println(F(",HDOP,"));
  Serial.println(tempfloat, 2);

  Serial.println();
  Serial.println();
}

void setup()
{
  GPSserial.begin(9600);

  Serial.begin(115200);

  Serial.println(F("GPS_Checker Starting"));
  Serial.println();
}

And this is the output:
18:36:59.425 -> Wait for updated GPS Fix
18:36:59.425 -> 54
18:36:59.425 -> 52
18:36:59.425 -> 13
18:36:59.425 -> 10
18:36:59.425 -> 36
18:36:59.425 -> 71
18:36:59.425 -> 78
18:36:59.425 -> 71
18:36:59.425 -> 76
18:36:59.425 -> 76⸮[J⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮P⸮⸮!⸮⸮Mt
(:⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮d`#
18:37:01.054 -> ⸮h⸮!⸮⸮MTM⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
m4M⸮$:4⸮H
⸮⸮:0⸮A⸮$⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
18:37:03.052 -> ⸮   ⸮$:⸮⸮A )⸮0⸮Q)⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮X$⸮⸮⸮AX)h0⸮A⸮⸮
m
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
18:37:05.049 ->  ⸮!!l0
V   ⸮4⸮A-⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
18:37:06.071 -> ⸮
!⸮l⸮H⸮H4:⸮⸮@⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
18:37:07.054 -> ⸮I:⸮⸮A⸮YI(⸮⸮AQ⸮ѴL⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮@Y :0⸮HQI:0-⸮
18:37:08.071 -> 4⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮m4⸮⸮⸮I⸮H  ⸮$2⸮⸮@⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
18:37:10.076 -> ⸮   l⸮!l⸮h⸮!⸮%#⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮IP⸮⸮A-⸮$⸮⸮20⸮Q)⸮4⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮M⸮!⸮1M⸮⸮h⸮#⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮M⸮⸮⸮⸮4M⸮Ҧ⸮I⸮
18:37:13.090 -> ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮H$⸮⸮⸮A⸮X)(0⸮A(⸮0
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮ ⸮I⸮h⸮H⸮⸮⸮R⸮m
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
18:37:16.065 -> A$:⸮⸮AYIh⸮⸮$42⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮5`!⸮%#⸮0⸮Q$:⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮@Y    :0⸮HQi20-⸮
18:37:18.077 -> 4⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮4`⸮⸮I⸮A    ⸮420⸮I)(⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮X$⸮⸮⸮AX)(0⸮A(⸮0
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮M⸮⸮-⸮⸮⸮4⸮A⸮Yi⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮ ⸮!Q⸮⸮I
T   ⸮$2⸮-⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
⸮⸮⸮i&⸮h⸮!
18:37:23.095 -> ⸮   h⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮La$⸮42⸮⸮Q (⸮h0Y⸮m4⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮iQI:0⸮A⸮⸮IM⸮
18:37:25.102 -> ⸮   ⸮P⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮A$:4⸮AX    ,0⸮Im⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮I  (420-⸮$⸮⸮⸮H⸮Q)⸮0⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
18:37:28.062 -> ⸮M⸮⸮20⸮II⸮⸮0⸮QI,⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮PI,⸮⸮A,$⸮⸮⸮@)⸮⸮"0⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮`@Q⸮⸮I⸮H  (4⸮A$⸮⸮⸮

What it's failing?
Thank you!

Did you connect RX to TX and TX to RX? Did you connect the grounds?

Yes, I've connected Rx's GPS module to Tx's ELEGOO and Tx's GPS module to Rx's ELEGOO, as well GND

Could you try 4800 and 115200 baud for GPSserial.begin()? I don't think it should matter, but could you also try it on two digital pins of the Uno, like 2 and 3 instead of A2 and A3?


text:
ESP8266-12E as WiFi interface for Arduino Mega
I have an Arduino Mega 2560 that I would like to connect to the internet using an ESP8266-12E.
Searching the internet for relevant keyphrases only yielded one type of result: The articles all explain how to program the ESP using the Arduino. Been there, done that.
Does anybody know of a way to use the ESP as a "wifi interface" for an Arduino, e.g. using a Serial interface from the Arduino?
Basically, I'd want to use the library ESP8266Wifi transparently on my Mega 2560, and maybe in conjunction with something like WifiManager - all of that running on the Mega.
The only thing I found was this: https://www.hackster.io/jeffpar0721/add-wifi-to-arduino-uno-663b9e. But this uses AT commands only.
Any hint is appreciated.

"Any hint is appreciated", here is my two cents: this lack of information is related to the fact that ESP8266 has processing power of its own, AND, it can handles transparently annoying things like IP stack, Wi-fi connections and so on, in such a way that you could do all your project with ESP8266 (even using the arduino IDE), and more complex projects with an ESP32. You can not use ESP's specific libraries as ESP8266Wifi transparently on a Mega2560, just because Mega has not the hardware to handle the IP / wifi stuff. Instead, Mega's application must "talk" AT commands with ESP via serial I/O

Another option it would be to use libraries to write a custom-built application to ESP8266, where ESP8266 could talk to Mega's application over SPI, i2c, serial, a bit-banged protocol, whatever. I suggest that you spend some hours reading this. But, anyways, just forget about using ESP's wifi libraries in a Mega. It won't even compile.

you can program the ESP or use AT, what else is there? You can't run wifi manager on a mega...

If you know how to write code for the esp8266, then write the networking part in the esp8266 and exchange data and commands with the sketch in Mega over Serial.
Other option is to use AT firmware with the WiFiEsp library or WiFiLink firmware with WiFiLink library.
Or you can connect the ESP-12 to Mega over SPI and use the WiFiSpiESP firmware with WiFiEsp library.
All mentioned libraries are 'clones' of the WiFi library.

ESP8266-01 usually come pre-programmed with the "AT" instructions interpreter for WiFi communication. If your -12 didn't, or if you've reprogrammed it, you'll need to find and download a copy of the AT interpreter to re-load.
Then you'll cross-connect one of the Mega's UARTs to the ESP (Tx > Rx and Rx > Tx), respecting the voltage level differences between the Mega and the ESP (5v vs. 3.3v). You'll need use a level-shifter or make a voltage divider for at least the Mega Tx > ESP Rx connection.
Then it's just a matter of using an existing Arduino ESP-WiFi library, or writing your own serial communications using the ESP's AT commands if you want the challenge.
I generally use the Blynk Internet of Things service and libraries as the quickest and a full-featured way to put a device online with access to/by your cellphone. It's not the only way but it's a good start.