body:
I have been designing my own PCB using the atsam3x8e chip, the same as the Arduino due which I used to prototype with. So far I've managed to get my boards up and running by programming them via the serial TX & RX pins using a USB to serial converter, but I can't seem to get the "Native" USB port to work in windows.

When the boards are plugged in, they show up in the windows device manager as "Unknown USB Device (Device Descriptor Request Failed)" but do not show up in BOSSA or Atmel Studio 7.0. My understanding was that when the chip is reset and erased, it should just show up as a "BOSSA programming port" the same as the Arduino DUE does when it is put through the same procedure.
I'm not sure whether this is an issue with the hardware design of the board or not. I have used a [USB C connector][1] instead of a Micro USB so have not connected the UOTGID pin and instead added two pulldown resistors to the CC pins on the new connector.

If anyone has any suggestions on this please let me know.

[![enter image description here][2]][2]
[![enter image description here][3]][3]

  [1]: https://www.digikey.co.uk/product-detail/en/gct/USB4110-GF-A/2073-USB4110-GF-A-1-ND/10384548
  [2]: https://i.stack.imgur.com/8aUIp.png
  [3]: https://i.stack.imgur.com/TcPbC.png

title: Native USB port on custom ATSAM3x8e board not recognised in windows

Answers: 0


body:
I am currently working on a project where I am trying to accurately find velocity in a handheld device using an IMU for about 30 seconds.
I have been having major issues doing this because of large amounts of drift from poor calculations due to inaccurate sensor readings.
I have tried tuning offsets for my sensor and using other sensor fusion libraries to find my linear acceleration.

At this point I don't know if I am doing something wrong, going about the process wrong, or if my sensors are just to inaccurate to accomplish this.

I am hoping if anyone may have recommendations on how to accomplish this from the ground up. I currently have two 9DOF IMUS listed below. The first one I tried to use the predefined linear acceleration function to find velocity in ndof mode, using bosch calibration steps. The second i spent hours tuning the offsets on to get linear acceleration and it came out much worse than the first sensor. For the second I can include code but I used the madgwick from the Adafruit_AHRS library for the sensor fusion for sake of time.

Any help is appreciated.

 1. https://www.adafruit.com/product/4646 (BNo055 first board)
 3. https://www.adafruit.com/product/3463 (FXOS8700 + FXAS21002 second board)

title: Finding Relatively Accurate Velocity Using an IMU

Answers: 2

body:
[Integration of acceleration to derive velocity][1] is a difficult task.  This is the first step in [dead reckoning][2].  Consider some of the following options to improve accuracy:

 1. Some IMUs can be adjusted to increase sample speed. If the
    acceleration is sudden, more samples my improve the accuracy of the
    calculated velocity.
 2. Try aligning just 1 of the axes of the IMU chip in the direction of
    acceleration. Do this to simplify the problem.  Depending on the
    Arduino you are using, the processor may not have the power to
    perform the trig functions necessary for anything except
    acceleration only along 1 of the IMU's axes.
 3. Take care of loosing significant digits.  If using integers, try
    multiplying everything up.  For example instead of 1 equaling 1
    meter multiply the value up such that 1000 equals 1.000 meters.  Now
    integer math can be used to calculate down to the mm.

  [1]: https://phys.libretexts.org/Bookshelves/University_Physics/Book:_University_Physics_(OpenStax)/Map:_University_Physics_I_-_Mechanics_Sound_Oscillations_and_Waves_(OpenStax)/03:_Motion_Along_a_Straight_Line/3.08:_Finding_Velocity_and_Displacement_from_Acceleration
  [2]: https://en.wikipedia.org/wiki/Dead_reckoning

body:
For more context I did ask BOSCH directly about this issue and explained my setup in more detail.

[https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BNO055-Outputting-Bad-Linear-Accel-Data/m-p/18976#M5212][1]

  [1]: https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BNO055-Outputting-Bad-Linear-Accel-Data/m-p/18976#M5212


body:
The last couple months I’ve been working on this project, I’m nearing its end and I’m getting really excited!  However, this is still pretty new to me and so I was hoping my electrical diagram/accumulated knowledge could be verified before I go and start spending money on parts.  All criticism is welcome as are any additional resources.
Thank you in advance!

[![Circuit diagram][1]][1]

  [1]: https://i.stack.imgur.com/zzcE9.png

Logic:

**Arduino setup:**

Arduino pins (aside from the power section) at the bottom are capable of outputting up to 40mA at most and when using multiple pins, no more than 200 mA should ever be drawn at once

Piezo buzzers are the only electrical component that do not need resistors

This was taken directly from How To Mechatronics, attaching a 330 Ohm resistor to the LED strip lowers its electrical noise

The other resistor attached to the LED strip should be 25 ohms, seeing as I don’t have one though I will be using a 27-ohm resistor instead.  Where 5 LED’s on the strip should take up 300mA (each GRB uses 20mA and I’m using 5 in total, therefore 20 x 3 x 5 = 300).  Using Ohms law R = V/I, therefore R = 7.5/0.3, therefore R = 25.

**I would like to add that I also looked at Watt’s law and was a big confused as I got a current of 200 mA instead (as the LED’s each use between 0.1 – 0.3 Watts, therefore I = W/V, therefore I = 1.5/7.5, therefore I = 0.2)  I went with the 27 ohms instead of the 37.5 ohms watts law gave me instead because How To Mechatronics really seemed to know what was up
I chose to power the board via the 7.5V, 1A adapter mostly because I wanted its voltage-in to be regulated and seeing as it won’t be plugged into a computer, I thought USB was a bit sketch and it made more sense to use the power port as opposed to the Vin pin.

**Motor setup:**

The motor was chosen based off of my need for high torque – the door handle I am trying to push requires 5 pounds (raised to 6 pounds for extra breathing room) and the entire handle is 4.5 inches (lowered to 3 inches for breathing room) in length (the measurements were provided by a friend as I wont be home for a little bit, might seem a bit overkill but its just cause I don’t think they are entirely accurate in the first place).  Using these measurements and the equation Torque = length x Force I got the required torque had to be greater than 0.3572kg/cm to open my door.  Knowing this I took a look at a bunch of Nema stepper motors and chose one capable of producing that torque (based off of its holding torque) that was the lightest and smallest.  I wanted something light as I am still unsure how I will be mounting this to my door…

Originally, I was going to use the L298N but seeing as how using the 5V pin off the Arduino is not recommended for powering it and that they generally don’t dissipate heat that well for their motors I decided not to

Lastly, the 12V 4A power supply was chosen because I needed something stronger than 9V and I wanted to save money.  Seeing as I would have the 0.5A - 0.7A current option selected (to my knowledge anything more could cause damage unlike with the Arduino, extra current is not necessarily a bad thing in this case) it’s a bit overkill.  I’m thinking it shouldn’t cause any thermal limiting though seeing as it is rated to 4A and its not as if my motor will be going that often anyways :)

Links (all links except for the motor which goes to pololu redirect to amazon):
**7.5V 1A Power supply:**
https://www.amazon.ca/Belker-Adjustable-Universal-Household-Electronics/dp/B07NKZCWT1/ref=cm_cr_arp_d_product_top?ie=UTF8
**12V 4A power supply:**
https://www.amazon.ca/COOLM-Adapter-100-240V-Doorbell-5-5X2-5MM/dp/B07H2T31JJ/ref=sr_1_6?dchild=1&keywords=10V+4A+POWER+SUPPLY&qid=1606959202&s=hi&sr=1-6
**KEYESTUDIO W5500 Ethernet Arduino (Uno):**
https://www.amazon.ca/gp/product/B079G4WDGW/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&th=1
**NEMA 14 stepper motor (2.7V, 1 A/Phase):**
https://www.pololu.com/product/1209
**TB6600 stepper motor driver:**
https://www.amazon.ca/TB6600-Stepper-Driver-Controller-tb6600/dp/B07B9ZQF5D/ref=asc_df_B07B9ZQF5D/?tag=googleshopc0c-20&linkCode=df0&hvadid=292963865944&hvpos=&hvnetw=g&hvrand=11283888445696292979&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9001232&hvtargid=pla-524548131497&psc=1
**LED strip (WS2812B):**
https://www.amazon.ca/gp/product/B01CDTED80/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1

title: Is this a feasible circuit?

Answers: 1

body:
Let's take a look at the LEDs.  Different kinds of LEDs have different forward voltage requirements. Non-bright LEDs tend to require less voltage than bright LEDs, since bright LEDs need more power to work. Typical VLED values are 1.7V for non-high-brightness red, 1.9V for high-brightness high-efficiency low-current red, 2V for orange and yellow, 2.1V for green, and 3.4 to 3.6V for bright white and most blue types.

In order to make sure that this voltage gets dropped across the LED, you should use a voltage greater than the LED's forward voltage. Use at least 3V supply voltage for lower-voltage LEDs and 4.5V for 3.4V types. Also add a resistor in series with the LED to limit excess current from burning out the LED, usually so that the current flowing through the LED is about 10mA. Make sure that the current doesn't exceed the maximum current specified on the LED's datasheet. You have 5 LEDs in series with (assuming keeps the math simple) a Vf of 2 Volts, therefore you need 5*2 (they add) or 10 volts to get them to light then a little more (2 volts) so you can control the current with a resistor. At this point you have 5 volts trying to push current through a 10V device circuit, nothing will happen. Using 12 volts and Ohm's law a 200 Ohm resistor will give you about 10 mA, a safe current for most LEDS. If you want them light replace the 27 Ohm with a 200 Ohm and connect to the +12V inplace of the 5V pin. Note LEDs do not work well in parallel unless the current is controlled in each LED or LED string. This is based on your schematic showing 5 LEDs powered by a 5V source.


body:
I have a question regarding the LM35. The sensor is supposed to have values that are to be directly proportional. But instead of the temperature increasing, the sensor values decrease.

This is my setup below. It seems to be a standard setup in different LM35 tutorial pages.

[![LM35 Breadboard configuration][1]][1]

    const int sensor= A0; // Assigning analog pin A0 to variable 'sensor'

    void setup() {
      pinMode(sensor,INPUT); // Configuring sensor pin as input
      Serial.begin(9600);
    }

    void loop() {

      float reading=analogRead(sensor); //Reading the value from sensor
      float vout= (reading*5000)/1024;
      float temp= vout/10;

      Serial.print("in DegreeC= ");
      Serial.print(temp);
      Serial.println("");

      delay(500); //Delay of 1 second for ease of viewing

    }

These are the results. From room temperature, I applied heat through the use of a lighter and it went lower instead of higher.

[![Heat up results][2]][2]

I read somewhere that it has something to do with the power supplied by the Arduino. However, when I used a 12V supply to power the Arduino, the readings became very erratic and unstable.

## **UPDATE:** ##

I have finally returned from the city (Took a long time because of Quarantine Restrictions) and I brought 3 LM35 from another shop. All 3 of the new LM35 worked as intended and didn't lower its temp reading when exposed to heat (With the same configuration). I could rule out these possibilities as to the reason why the LM35 didn't work.

 **1. Manufacturing Defect** - all **three** of the LM35 didn't work as intended. They all had their temperature lowered when exposed to heat. There could be a defect in the manufacturing process because it doesn't work as advertised. (Leaning towards this)

 **2. Static Electricity** - I remember receiving the LM35 in a plastic bag as packaged by the shop. It could have been affected by static electricity and damaged the circuit inside (on all three though?). The LM35s I received recently had been packaged in those electrostatic discharge protection packaging so it could have probably contributed to it? I need more insight on this I apologize for not being able to properly word it out.

There could be more but these are the most I could come up with as a conclusion.

  [1]: https://i.stack.imgur.com/igZQQ.png
  [2]: https://i.stack.imgur.com/SOYHX.png

title: LM35 temperature decreases when heated

Answers: 1

body:
You are reading A5 but in your diagram you show it hooked up to A0:

[![enter image description here][1]][1]

Change your code to this and I believe it will work:

    const int sensor= A0; // Assigning analog pin A0 to variable 'sensor'

    void setup() {
      pinMode(sensor,INPUT); // Configuring sensor pin as input
      Serial.begin(9600);
    }

    void loop() {

      float reading=analogRead(sensor); //Reading the value from sensor
      float vout= (reading*5000)/1024;
      float temp= vout/10;

      Serial.print("in DegreeC= ");
      Serial.print(temp);
      Serial.println("");

      delay(500); //Delay of 1 second for ease of viewing

    }

The data you are reading from A5 is indeterminate and just happens to decrease as A0 increases.

================================================================================
UPDATE:

Ok, so you corrected yourself and are reading the correct pin in spite of what your schematic shows.  Please explain this:

    float vout= (reading*5000)/1024;
    float temp= vout/10;

I think you want:

    float vout = (reading/1024.0) * 5000.0;
    float temp = vout/10.0;

You are carelessly mixing floating point and integer math.

  [1]: https://i.stack.imgur.com/mnjoU.png


body:
[![enter image description here][1]][1][![enter image description here][2]][2]I am having a problem I am testing logic level shifter <https://ewall.com.pk/product_view/IIC-I2C-Logic-Level-Converter-Bi-Directional-Module-5V-to-3.3V/910>. I have followed the procedure as given in this post <https://arduino.stackexchange.com/questions/23774/test-level-shifter-with-arduino-and-some-data>. But I am getting opposite result when I connect LV1 to LV2 arduino stop uploading and give error and nothing displays on serail monitor. Kindly help me.

  [1]: https://i.stack.imgur.com/kBSY5.jpg
  [2]: https://i.stack.imgur.com/dwUsf.jpg

title: Testing of voltage level converter with arduino

Answers: 0


body:
I have an A6 GPRS module, and my Samsung phone power adapter has output of 5V and 2A. But it also says 9V and 1.6A

[![My Samsung Mobile Power Adapter][1]][1]
My Phone's Adapter

So would it damage my A6 GPRS Module if I plug this to it via the micro usb power port? (especially because it also says 9V)?

[![My A6 GPRS module][2]][2]

My A6 GPRS module

  [1]: https://i.stack.imgur.com/t2nMp.png
  [2]: https://i.stack.imgur.com/HhhAW.png

title: Can I safely connect my A6 GPRS module to this 5V 2A phone adapter

Answers: 1

body:
The standard output for USB is 5V but there are some such chargers that will output more for enhanced charging output on devices that support it.

In this case the adapter will default to 5V and will only upgrade to 9V if the device requests it.  The GPRS module will not request 9V and so the adapter will continue to provide only 5V which is what you want.


body:
Can we find out about the parts that the arduino uses?

I want to make a shield, and i bought the same power jacks.

And i thought that there would be two pins, one for power, one for GND.
However, it has three pins.

The supplier did not have a datasheet, and right now i do not have a continuity beeper either, so could i see its datasheet somewhere, or does anyone know why it has three pins?

title: Datasheet of arduino power jack

Answers: 1

body:
This is an image from a typical power jack:

[![From here https://www.we-online.de/katalog/datasheet/6941xx301002.pdf][1]][1]

The specific ones you bought may differ.  The vendor should be able to supply you with a manufacturer and P/N or an actual data sheet.

Image copied from: https://www.we-online.de/katalog/datasheet/6941xx301002.pdf

  [1]: https://i.stack.imgur.com/MBQAz.png


body:
I reprogrammed the Atmega32u4 on my Arduino Uno Wifi Rev2 in order to use it as a human interface device, but I am now having difficulty programming the 4809 (through the 32u4 over UPDI) with the Arduino software. I have tried reprogramming the 32u4 with medbg_updi.hex from Atmel Studio and also Xplained Yourself Firmware from https://hackaday.io/project/162372-xplained-yourself.

I have had some success writing some smaller applications to the 4809 but when I try to program larger applications (which used to work before I fiddled with the 32u4), I now get verification error saying that there is a mismatch.

    avrdude: verifying ...
    avrdude: verification error, first mismatch at byte 0x0200
             0x08 != 0x0c
    avrdude: verification error; content mismatch
    avrdude: jtag3_edbg_signoff(): unexpected response 0x03, 0x80

When cross referencing with other working Uno Wifi Rev2 boards, they have

    ICE firmware version: 1.19 (rel. 57)

while I now apparently have

    ICE firmware version: 1.13 (rel. 43)

I do not see any place to find the updated/original firmware which came with my arduino. My thought is that the firmware is not available for direct download because it may be licensed from Microchip (Atmel) and not distributed/proprietary...

Please assist me if possible in restoring the full functionality of my Arduino Uno Wifi Rev2. Any insights would be appreciated.

title: Firmware for Atmega32u4 on the Arduino Uno Wifi Rev2 (causing upload issues)

Answers: 0


body:
I need a module for ARDUINO that can both detect Voltage (12V) **and** Control current between 2 pins (12V), like a relay on another device

I have found relay modules to control pins and another module for 4-channel Voltage detection, but it seems like a lot of components and wiring.

Is there any module that can do both?

title: Module that can both detect Voltage (12V) and Control current

Answers: 2

body:
You don't need another module to detect voltage on an Arduino.  The UNO, which I assume you are using, has 6 analog inputs (A0-A5) that can directly read voltage.  The only problem is that you want to measure a voltage up to 12V and the Arduino can only handle 5V.  So the solution is to DIVIDE that using two resistors in a voltage-divider configuration so that you only see 5V at the Arduino when there is 12V on the signal.

From here: https://www.electroniclinic.com/what-is-a-voltage-divider-or-potential-divider-formula-and-practical-uses/

you can see how to make one:

[![enter image description here][1]][1]

As far as controlling a "current" that is usually done with a relay.  There are no on-board relays but there are the digital outputs that can drive a small relay or can be connected via some other circuitry like a couple of transistors to drive just about any size relay.

  [1]: https://i.stack.imgur.com/84WFx.png

body:
I would suggest opto-isolators for both directions.

<!-- Begin schematic: In order to preserve an editable schematic, please
     don't edit this section directly.
     Click the "edit" link below the image in the preview instead. -->

![schematic](https://i.stack.imgur.com/s8B2Z.png)

<!-- End schematic -->

For the Ardiuno sending control signal you have to know which way round to connect to the inputs of your controller. Chances are one will be ground - that's "CTL Low".


body:
Everything i read about the chinese Digispark attiny85 clones says you can use p0-5 as digitlal I\O (p5 as after fuse reset)

Simple test code for a button will not let me use P1 as an input tied to a simple button.

The code below works on p0,p2,p5 but will only interrupt the LED that is set to on, on P1.

    #include "DigiKeyboard.h"

    //pins 3 & 4 used for usb connection
    bool buttonState1 = 0;

    void setup() {
      pinMode(1, INPUT);
      digitalWrite(1, HIGH); //turn on pull-up resistor
    }

    void loop() {

        if (digitalRead(1)!= buttonState1){
          buttonState1 = digitalRead(1);
          if (buttonState1 == LOW)DigiKeyboard.print("test1");
        }

    }

title: Attiny85 Clone Cannot set P1 to input

Answers: 1

body:
I had a quick look into the Schematics of a digisparc board. P1 is hardwired over an LED and a resistor to GND. If you turn on the PULL UP resistor for P1 the LED should light up and the voltage at P1 would be very low (it depends on the voltage divider that is built from the PULL UP resistor and the LED resistor); so the P1 reading should be LOW. If you connected the Button to GND and press it, the voltage at P1 drops to 0. But, that does not affect the LOW state. The program does not react. The LED turns off, because it is not powered anymore.

You could try to connect the button to +5V and do not setup a PULL UP resistor for P1. If you press the button the LED should light up and +5V should be at P1. It should change its state from high to low. (I did not tried that; but I see no reason, why it would not work).


body: I want to make a project where there is a parking lot and a ir sensor which senses when a car comes and displays a message on lcd saying to insert a rfid card and then it opens a gate and there are many ir sensors in the slots to detect where there are cars and sends a message saying which slot is free.but the problem is many parts need the 5v pin but there is only one on the arduino board so i wanted to ask if any problem will occur if we connect multiple parts to one 5v pin if there will be a problem what is the work around.

title: arduino parking lot

Answers: 1

body: You can connect multiple devices or modules to the same 5v pin, as long as it does not exceed the maximum current that the on-board 5v regulator can handled. If you are using a genuine [Arduino Uno](https://content.arduino.cc/assets/UNO-TH_Rev3e_sch.pdf), it has a [NCP1117](https://www.onsemi.com/pub/Collateral/NCP1117-D.PDF) which has a maximum current of 1A. If you don't have a genuine Arduino Uno, check the part number and find the datasheet to find out the maximum current.


body:
In order to send a long payload I've created the following function:

    void splitMSG(const char *msg, const int arraySize, const int len)
    {
      Serial.print("Array size: ");
      Serial.println(arraySize);
      byte numPackets = (int)(arraySize / len);
      byte P_iterator = 0;
      if (arraySize % len > 0)
      {
        numPackets++;
      }
      Serial.print("num_Packets: ");
      Serial.println(numPackets);

      while (P_iterator < numPackets)
      {
        char t[len + 1];
        char *ptr1 = msg + P_iterator * (len);
        strncpy(t, ptr1, len);
        t[len + 1] = '\0';
        Serial.println(t);
        radio.write(&t, sizeof(t));
        P_iterator++;
      }
    }

The split message is sent to the serial monitor to verify it is as expected.

**On the sending device :

    void loop()
    {
      radio.stopListening();

      char send_msg[] = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";  // <----- input msg
      splitMSG(send_msg, sizeof(send_msg), 10);                  // <----- split to 10 bytes a packet
      delay(1000);
      // Serial.println("±±±±±±±±");
    }

On the serial monitor I get:

    08:06:17.569 -> Array size: 37
    08:06:17.569 -> num_Packets: 4
    08:06:17.569 -> 1234567890
    08:06:17.569 -> ABCDEFGHIJ
    08:06:17.569 -> KLMNOPQRST
    08:06:17.569 -> UVWXYZ

**On the receiving device:

    void loop()
    {
      if (radio.available())
      {
        while (radio.available())
        {
          char buf[32];
          radio.read(&buf, sizeof(buf));
          Serial.print("got msg: ");
          Serial.println(buf);
          radio.flush_rx();
        }
      }

      delay(100);
    }

On the serial monitor I get:

    08:08:18.462 -> got msg: 1234567890⸮⸮⸮⸮
    08:08:18.561 -> got msg: ABCDEFGHIJKLMNOPQRSTUVWXYZ
    08:08:19.555 -> got msg: 1234567890ABCDEFGHIJKLMNOPQRST⸮⸮⸮⸮
    08:08:20.549 -> got msg: 1234567890ABCDEFGHIJKLMNOPQRST⸮⸮⸮⸮
    08:08:21.576 -> got msg: 1234567890ABCDEFGHIJKLMNOPQRST⸮⸮⸮⸮
    08:08:22.570 -> got msg: 1234567890ABCDEFGHIJKLMNOPQRST⸮⸮⸮⸮
    08:08:22.669 -> got msg: UVWXYZ

Does the problem with `radio.write` ' buffer , or the way I split the message ?

title: RF24- Splitting and sending a longer than 32 byte payload

Answers: 1

body:
    t[len + 1] = '\0';

Your array is declared as having `len+1` bytes of storage. So the last index is `len`, not `len+1`. You're writing the zero one past the end of the array, thus you're not transmitting it (and sending one byte of "garbage" instead).


body:
Suppose a bot with wheels is traveling in a a straight line, and we want to measure this linear distance traversed by it as accurately as possible.

One of the ways is to use an optical encoder to measure the angle of rotation of the wheels and get the linear distance traveled.

Another way could be to use the data from accelerometer and get the linear distance traveled.

Which of these two methods would be better? Is there a third method which is more precise than the previous two?

title: Most precise way to measure linear distance travelled by a wheel

Answers: 2

body:
If you measure  one of the free running wheels (with no motor connect to it), it depends on the traction of the wheel, but that could be fairly accurate.

If you move horizontally a simple accellerometer (1 axis) would be great. But if you have a vertical component, then you can not distinct between accelleration and weight force (Einstein). If you use a 3 axes accellerometer, you can compute/extract the robots moving speed (subtract the G component = 9.81 m/s²) and thus the distance. You have to use vector arithmetic in this case.

If the ground has enough "structure" you could use an optical sensor (like optical mice have).

If you have a reference object (e.g. a wall, a book) you could use a LIDAR sensor (https://en.wikipedia.org/wiki/Lidar) to measure the absolute distances at time points and compute the relative distance between these time points.

body:
If you use an accelerometer, you have to integrate twice to arrive at distance travelled. These two integrations will also compound errors and noise, so the result won't be very accurate without many corrections.

If a wheel doesn't slip and is undriven, the results of counting wheel rotations should be fairly accurate when the robot is moving in a straight line.

Dragging a cheap computer mouse behind the robot and reading its output could also work, but I haven't tried that one yet.

The most accurate, if you can set up a flat object that reflects well enough at the destination of the robot, is probably LIDAR. Not cheap, but easy enough to do as long as the robot moves in a straight line.

Another option would be to count wheel rotations, and calibrate with LIDAR (or GPS for very long distances) and use the calibrated wheel rotations in the final version, or use two or more methods and do sensor fusion.


body:
I am currently working on a project where i take a frequency, and i want the code to take that value and use a formula to work out its mmh2O level. I use the Serial Monitor to input the values, but i have a problem. When writing the values e.g. "44.62352548","44.49151522". The value that is sent is wrong and displayed wrong.
[![enter image description here][1]][1]

I know the code i have written does not support this many signigicant figures from a float. And i have tried a few things to try and solve it but i cannot crack it.

I have tried using dtostrf() command, but i have never used this before and dont understand. Somebody from the arduino Forums had helped me out but it didnt seem to work.
I have also tried formatting aswell, and that did not seem to work.

If anyone has any help and advice it would be much appreciated.
```
float level;
float myValue;

String msg1 = "Enter Frequency (type 0 to exit): ";
String msg2 = "Your Frequency is: ";

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.print(msg1);

  while (Serial.available() == 0);
  {

  }
  myValue = Serial.parseFloat();
  if (myValue == 0.0)
  {
    Serial.end();
  }
  else
  {
    freqConversion();
  }
}

 void freqConversion()
{
  level = (myValue-44.712)/-0.0285493333;
  Serial.println(myValue);
  Serial.print(msg2);
  Serial.println(level);
}
```

  [1]: https://i.stack.imgur.com/abfZK.png

title: Problems with inputting into serial monitor

Answers: 1

body:
You have hit a bug in the implementation of `parseFloat()`.

This function [reads the number you send as an integer][parse], ignoring
the decimal point, and stores it in a `long`. It then multiplies it by a
scaling factor (a power of 0.1) in order to get the correct value. The
problem is, if you provide too many significant digits, the integer
overflows, and you get garbage. For example "44.64978683" is interpreted
as

```c++
(long) 4464978683 * 0.00000001
```

but `(long) 4464978683` overflows and rolls over to 170011387, hence the
result you get.

Simple workaround: do not provide so many significant digits. They are
irrelevant anyway given the resolution of a `float`.

**Edit**: I did not find any bug report for this issue, so [I submitted my own][issue] to the Arduino dev team.

[parse]: https://github.com/arduino/ArduinoCore-API/blob/1.1.0/api/Stream.cpp#L182
[issue]: https://github.com/arduino/ArduinoCore-API/issues/129

**Update**: Per request of a maintainer, I submitted [a pull
request][pr] with a failing unit test revealing this bug. We then worked
on a fix, which has now been merged to master. It should be published on
the next release of ArduinoCore-API.

Note, however, that the AVR core does not yet use the common API
repository. In the meantime, it may be worth submitting a pull request
to ArduinoCore-avr that cherry-picks the fix from ArduinoCore-API.

[pr]: https://github.com/arduino/ArduinoCore-API/pull/133


body:
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!

title: GPS6MV2 not showing properly

Answers: 0


body:
I am looking to use an Arduino to monitor an incoming audio source (mobile radio/HAM/Walkie Talkie) for a transmission and send this stream through the car audio system speakers. Speaking back on the radio isn't important, but might explore using the car system for that as well.

My car provides the built in ability to listen to FM radio with my phone paired through bluetooth. When a call comes in on my phone, the car system detects and mutes the FM radio to play a ringtone from my phone over the car speakers. It also displays caller info, but I don't care about that for the radio audio. My car also has wired only Apple CarPlay. I would like to be able to plug my iPhone in through the cable for music streaming, and then connect my mobile radio through bluetooth to have the short messages mute the music and play the radio audio similar to the phone ring.

I am seasoned with Arduino but pretty new to bluetooth. Research so far looks like the ring and other actions happen through AT type of commands within the Headset Profile. Page 23 of the PDF below shows a RING command, but no ability to set the specific 'ringtone' if you will. Page 34 of the PDF suggests there is a way to set these ringtones or even an audio notification. Are these capable of relaying a live stream such as a mobile radio source?
Reference PDF: https://www.silabs.com/documents/public/application-notes/AN992.pdf

Is this something possible with a bluetooth module on Arduino?

The alternative scenario I can fall back on would be a Bluetooth middle man that can accept multiple audio signals (hopefully with bluetooth as an option), and then mute the primary source to play the secondary. I prefer above so I can use the CarPlay functions.

title: Bluetooth and Short Audio Source

Answers: 0


body: I want to constantly store data to sd. But how I make sure data is not corrupted on moment of power off? I think I could add small capacitor on 5V and check when voltage drops, so I would stop data write. Or is there better solution for safe data write?

title: How safely write to SD or Eeprom on Arduino power off

Answers: 2

body:
I think a "small" capacitor here is not going to do the job as you need to keep power stable until the write is completed.  You need to determine:

 1. How much power am I using?
 2. How quickly can I detect a power outage?
 3. How much time do I need to keep power on the Arduino to complete the write operation(s) I want to complete.

Then you will be in a position to calculate how much capacity you need and whether a capacitor or battery is more appropriate.

body:
You're probably going to want to look to [various forms of NVRAM (Non-volatile RAM)][1].  SRAM with an automatic save to EEPROM function on power loss, e.g. [47L16][2].  Or battery backed RAM; if you have a real-time clock in your project you may have some limited storage in it.  E.g., the [DS1307][3] has 56 bytes, although you can probably find a more accurate RTC that has storage in it.  Or FRAM, though it's as bit expensive, e.g. [cy15b064q-sxet][4]

In any case you'd probably want to write your data out in blocks with CRC so that you can make a determination on whether or not a partial write was done when reading back later.

  [1]: https://en.wikipedia.org/wiki/Non-volatile_random-access_memory
  [2]: https://www.microchip.com/wwwproducts/en/47L16
  [3]: https://datasheets.maximintegrated.com/en/ds/DS1307.pdf
  [4]: https://www.cypress.com/part/cy15b064q-sxet


body:
**SOLVED! See bottom.**

I know this question has been asked a lot (believe me, I've been Googling for solutions for 3 days, and have come across many posts on SE), but none of the posts I've found have solved my issue. Much of the problem, I think, is many of the solutions are several years old and discuss options either no longer available in the IDE, or no longer valid for the hardware.

I have an ATmega328P-PU on a breadboard. Largely following [this guide][1], I hooked it up like this in order to burn the bootloader.

[![Bootloader Schematic][2]][2]

I uploaded the "Arduino ISP" sketch from Examples to my Uno, and selected "Arduino as ISP" as the programmer. I tried selecting "Arduino Duemilanove or Nano w/ ATmega328" from the boards menu (per the guide), but the option no longer exists in standard install of IDE v.1.8.13. I tried "Arduino Duemilanove or Diecimila", as well as "Arduino Nano" as boards, both with "ATmega328P" as the processor (and, in the case of Arduino Nano, also tried "ATmega328P (Old bootloader)", as mentioned several times). All failed.

I finally found a reference to the MiniCore board library, installed it, selected "ATmega328", with "External 16 MHz" for the clock, and was finally able to burn the bootloader.

    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf -v -patmega328p -cstk500v1 -PCOM3 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:0b11111101:m -Uhfuse:w:0b11011110:m -Ulfuse:w:0b11110111:m

    avrdude: Version 6.3-20190619
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"

             Using Port                    : COM3
             Using Programmer              : stk500v1
             Overriding Baud Rate          : 19200
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :

                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : STK500
             Description     : Atmel STK500 Version 1.x firmware
             Hardware Version: 2
             Firmware Version: 1.18
             Topcard         : Unknown
             Vtarget         : 0.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us

    avrdude: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.04s

    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: erasing chip
    avrdude: reading input file "0x3f"
    avrdude: writing lock (1 bytes):

    Writing | ################################################## | 100% 0.02s

    avrdude: 1 bytes of lock written
    avrdude: verifying lock memory against 0x3f:
    avrdude: load data lock data from input file 0x3f:
    avrdude: input file 0x3f contains 1 bytes
    avrdude: reading on-chip lock data:

    Reading | ################################################## | 100% 0.02s

    avrdude: verifying ...
    avrdude: 1 bytes of lock verified
    avrdude: reading input file "0b11111101"
    avrdude: writing efuse (1 bytes):

    Writing | ################################################## | 100% 0.02s

    avrdude: 1 bytes of efuse written
    avrdude: verifying efuse memory against 0b11111101:
    avrdude: load data efuse data from input file 0b11111101:
    avrdude: input file 0b11111101 contains 1 bytes
    avrdude: reading on-chip efuse data:

    Reading | ################################################## | 100% 0.01s

    avrdude: verifying ...
    avrdude: 1 bytes of efuse verified
    avrdude: reading input file "0b11011110"
    avrdude: writing hfuse (1 bytes):

    Writing | ################################################## | 100% 0.05s

    avrdude: 1 bytes of hfuse written
    avrdude: verifying hfuse memory against 0b11011110:
    avrdude: load data hfuse data from input file 0b11011110:
    avrdude: input file 0b11011110 contains 1 bytes
    avrdude: reading on-chip hfuse data:

    Reading | ################################################## | 100% 0.02s

    avrdude: verifying ...
    avrdude: 1 bytes of hfuse verified
    avrdude: reading input file "0b11110111"
    avrdude: writing lfuse (1 bytes):

    Writing | ################################################## | 100% 0.05s

    avrdude: 1 bytes of lfuse written
    avrdude: verifying lfuse memory against 0b11110111:
    avrdude: load data lfuse data from input file 0b11110111:
    avrdude: input file 0b11110111 contains 1 bytes
    avrdude: reading on-chip lfuse data:

    Reading | ################################################## | 100% 0.02s

    avrdude: verifying ...
    avrdude: 1 bytes of lfuse verified

    avrdude done.  Thank you.

    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf -v -patmega328p -cstk500v1 -PCOM3 -b19200 -Uflash:w:C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/16000000L/optiboot_flash_atmega328p_UART0_115200_16000000L_B5.hex:i -Ulock:w:0x0f:m

    avrdude: Version 6.3-20190619
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"

             Using Port                    : COM3
             Using Programmer              : stk500v1
             Overriding Baud Rate          : 19200
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :

                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : STK500
             Description     : Atmel STK500 Version 1.x firmware
             Hardware Version: 2
             Firmware Version: 1.18
             Topcard         : Unknown
             Vtarget         : 0.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us

    avrdude: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.04s

    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
    avrdude: erasing chip
    avrdude: reading input file "C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/16000000L/optiboot_flash_atmega328p_UART0_115200_16000000L_B5.hex"
    avrdude: writing flash (32768 bytes):

    Writing | ################################################## | 100% -0.00s

    avrdude: 32768 bytes of flash written
    avrdude: verifying flash memory against C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/16000000L/optiboot_flash_atmega328p_UART0_115200_16000000L_B5.hex:
    avrdude: load data flash data from input file C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/16000000L/optiboot_flash_atmega328p_UART0_115200_16000000L_B5.hex:
    avrdude: input file C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/16000000L/optiboot_flash_atmega328p_UART0_115200_16000000L_B5.hex contains 32768 bytes
    avrdude: reading on-chip flash data:

    Reading | ################################################## | 100% -0.00s

    avrdude: verifying ...
    avrdude: 32768 bytes of flash verified
    avrdude: reading input file "0x0f"
    avrdude: writing lock (1 bytes):

    Writing | ################################################## | 100% 0.05s

    avrdude: 1 bytes of lock written
    avrdude: verifying lock memory against 0x0f:
    avrdude: load data lock data from input file 0x0f:
    avrdude: input file 0x0f contains 1 bytes
    avrdude: reading on-chip lock data:

    Reading | ################################################## | 100% 0.02s

    avrdude: verifying ...
    avrdude: 1 bytes of lock verified

    avrdude done.  Thank you.

So I then reconfigured the breadboard. I do not have an Uno with a removable ATmega, so I am using an FTDI break-out board instead, wiring like so

[![Programming Configuration][3]][3]

Selected the same "ATmega328" from the MiniCore library (actually, I tried nearly every board on the list in desperation), and still get the "programmer is not responding" error until the IDE gives up.

    Sketch uses 1030 bytes (3%) of program storage space. Maximum is 32256 bytes.
    Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf -v -patmega328p -carduino -PCOM7 -b115200 -D -Uflash:w:C:\Users\<username>\AppData\Local\Temp\arduino_build_929593/Blink.ino.hex:i

    avrdude: Version 6.3-20190619
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Users\<username>\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"

             Using Port                    : COM7
             Using Programmer              : arduino
             Overriding Baud Rate          : 115200
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x30
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x30

    avrdude done.  Thank you.

    Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

I've uninstalled and reinstalled the USB/FTDI drivers, I've tried two different FTDI boards, I've even tried the "Minimal Circuit" described in the guide (removing the oscillator, capacitors, and the pull-up resistor, and installed/selected the "ATmega328 on a breadboard" board), nothing seems to work. It also seemed odd that TX pin on the Arduino/FTDI was going the the TX pin on the ATmega, so I even tried switching TX and RX. Same error.

Also scrapped everything and tried following [this video][4] (and subsequent webpage guide), which makes it look so simple, with a 100nF capacitor in place of the pull-up resistor on the Mega's reset pin. Same error.

I'm truly at wit's end. Does anyone have any additional pointers that are current?

T(LOADS!)IA

EDIT: include photo of breadboard as requested.

[![Programming Breadboard][5]][5]

EDIT #2: deleted resistor, added 100nF cap on DTR pin.

[![Programming Breadboard w/Cap on DTR][6]][6]

EDIT #3: updated wiring including cap and resistor on DTR

[![Programming Breadboard w/Cap & Resistor on DTR][7]][7]

UPDATE: I solved the issue with lots of help from timemage.
I had pulled the ATmega from another project that had already set the chip to use the 8MHz internal clock. So I had to rewire the board as the first schematic, with the 16MHz external crystal still installed, then re-burn the bootloader making sure to select "Internal 8MHz" from the Clock options of the
MiniCore board. Once the bootloader was re-flashed, I could then re-wire the board according to the second schematic only with the 16MHz crystal and the 20nF caps removed, and the FTDI board was then able to upload sketches.

BIG shout out to timemage, who sat in chat with me for over an hour trying to figure it out.

UPDATE #2: the FTDI board I was using - the DFRobot USB2Serial Light (DFR0164) - actually has the pins mislabelled (or, rather, not labelled as expected). The TX pin actually does get wired to the TX pin of the ATMega, and the RX pin goes to the RX pin of the ATmega.

  [1]: https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoToBreadboard
  [2]: https://i.stack.imgur.com/Gs0BR.png
  [3]: https://i.stack.imgur.com/C85Vh.png
  [4]: https://youtu.be/npc3uzEVvc0
  [5]: https://i.stack.imgur.com/ldMgJ.jpg
  [6]: https://i.stack.imgur.com/3xACw.jpg
  [7]: https://i.stack.imgur.com/TbrOP.png

title: Still getting "stk500_recv(): programmer is not responding" while uploading to bare ATmega328P

Answers: 0


body:
I am probing the SPI Clock pin 13 with my analog discovery 2. Nothing else is connected. The clock signal is there but it rises over time. (see picture) Here is my code:
```
#include <SPI.h>
void setup() {
  // put your setup code here, to run once:
  SPI.begin();
  SPI.beginTransaction(SPISettings(100000, MSBFIRST, SPI_MODE0));
  pinMode(8, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(8,LOW);
  SPI.transfer(0xF7);
  SPI.transfer(0xFF);
  digitalWrite(8,HIGH);
  delay(500);

}
```

What do you think is causing this? Thanks
[![enter image description here][1]][1]

  [1]: https://i.stack.imgur.com/QxWCc.png

title: SPI Clock Signal not stable

Answers: 0


body:
I have a problem with my Arduino and LCD touch screen. I create a few functional button in my Arduino. One of the button is START button. Right now, I want the image is display when I touch START button but the problem is when i touch the START button, the image is display only few second and turn to white screen. How can I solve this problem. Need someone help regarding on this simple issue. Here I attach my code.

**page_testing_v2.ino**

    #include <Elegoo_GFX.h>                   // Core graphics library
    #include <Elegoo_TFTLCD.h>                // Hardware-specific library
    #include <TouchScreen.h>                  // Touch Support

    #define TS_MINX 903
    #define TS_MINY 914
    #define TS_MAXX 90
    #define TS_MAXY 108
    #define YP A3                             // must be an analog pin, use "An" notation!
    #define XM A2                             // must be an analog pin, use "An" notation!
    #define YM 9                              // can be a digital pin
    #define XP 8                              // can be a digital pin

    TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

    // macros for color (16 bit)
    #define BLACK   0x0000
    #define BLUE    0x001F
    #define RED     0xF800
    #define GREEN   0x07E0
    #define CYAN    0x07FF
    #define MAGENTA 0xF81F
    #define YELLOW  0xFFE0
    #define WHITE   0xFFFF
    #define GREY    0xD6BA
    #define TURQUOISE 0x448E
    #define GREENEON  0x67E9
    #define PURPLE    0x7018
    #define LILAC     0xAC38

    #define LCD_CS A3                         // Chip Select goes to Analog 3
    #define LCD_CD A2                         // Command/Data goes to Analog 2
    #define LCD_WR A1                         // LCD Write goes to Analog 1
    #define LCD_RD A0                         // LCD Read goes to Analog 0
    #define LCD_RESET A4                      // Can alternately just connect to Arduino's reset pin

    Elegoo_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

    #define MINPRESSURE 10
    #define MAXPRESSURE 1000

    extern uint8_t tankIcon[];

    boolean button1 = true;
    int touch = 0;

    char currentPage, selectedUnit;

    const int led1 = 51;
    const int led2 = 53;

    int led1State = LOW;
    int led2State = LOW;

    unsigned long previous = 0;

    unsigned long current = 0;
    long elapsed = current - previous;

    long cycle = 10000;

    //Start the system sequence
    void startSystem(){
      current = millis();
      elapsed = current - previous;

      if (elapsed >= cycle){  // this if statement resets the cycle timer
        previous = current;
        //previous = previous + cycle;
      }
      if (elapsed > 500 && elapsed < 5000){
        led1State = LOW;
        led2State = HIGH;
      }
      if (elapsed > 5500 && elapsed < 10000){
        led2State = LOW;
        led1State = HIGH;
      }
    //
    //  else
    //  {
    //    led2State = HIGH;
    //    led1State = HIGH;
    //  }

        // set the LED with the ledState of the variable:
        digitalWrite(led1, led1State);
        digitalWrite(led2, led2State);
    }

    void stopSystem(){
      current = millis();
      elapsed = current - previous;

      if(elapsed >= cycle)  // this if statement resets the cycle timer
        //previous = current;
        previous = previous + cycle;

        if (elapsed > 1000 && elapsed < 19999){
          led1State = LOW;
          led2State = LOW;
        }

        // set the LED with the ledState of the variable:
        digitalWrite(led1, led1State);
        digitalWrite(led2, led2State);

        return millis() - current;
    }

    void drawHomeScreen(){
      tft.fillScreen(BLACK);                  // Black Background
      //Draw white frame
      tft.drawRect(0,0,319,240,WHITE);
       //Title at home screen
      tft.setCursor(25,5);
      tft.setTextColor(WHITE);
      tft.setTextSize(2);
      tft.print("Compressed Air System");
       //Draw line under title
      tft.drawLine(0,30,320,30,WHITE);
      //Add text with frame 'SYSTEM'
      tft.setCursor(10,35);
      tft.setTextColor(YELLOW);
      tft.setTextSize(2);
      tft.print("SYSTEM");
       //Add START button
      tft.fillRect(95,38,105,70,GREEN);
      tft.drawRect(95,38,105,70,WHITE);
      tft.setCursor(115,55);
      tft.setTextColor(WHITE);
      tft.setTextSize(2);
      tft.print("START");
       //Add PAUSE button
       //Add RESUME button
       //Add E-STOP button (to shut down the whole system if anything happens)
      tft.fillRect(205,38,105,70,RED);
      tft.drawRect(205,38,105,70,WHITE);
      tft.setCursor(230,55);
      tft.setTextColor(WHITE);
      tft.setTextSize(2);
      tft.print("STOP");
        //Draw line
      tft.drawLine(0,115,320,115,WHITE);
       //Add text with frame 'MANUAL'
      tft.setCursor(10,120);
      tft.setTextColor(YELLOW);
      tft.setTextSize(2);
      tft.print("MANUAL");
       //Add text with frame 'COMPRESSOR 1'
      tft.setCursor(40,140);
      tft.setTextColor(MAGENTA);
      tft.setTextSize(1);
      tft.print("Compressor 1");
       //Add ON/OFF button
      tft.fillRect(0,150,80,75,GREEN);
      tft.drawRect(0,150,80,75,WHITE);
      tft.setCursor(25,180);
      tft.setTextColor(WHITE);
      tft.setTextSize(2);
      tft.print("ON");

      tft.fillRect(80,150,80,75,RED);
      tft.drawRect(80,150,80,75,WHITE);
      tft.setCursor(100,180);
      tft.setTextColor(WHITE);
      tft.setTextSize(2);
      tft.print("OFF");

        //Draw line
      tft.drawLine(160,115,160,240,WHITE);

       //Add text with frame 'COMPRESSOR 2'
      tft.setCursor(200,140);
      tft.setTextColor(MAGENTA);
      tft.setTextSize(1);
      tft.print("Compressor 2");

       //Add ON/OFF button
      tft.fillRect(160,150,80,75,GREEN);
      tft.drawRect(160,150,80,75,WHITE);
      tft.setCursor(185,180);
      tft.setTextColor(WHITE);
      tft.setTextSize(2);
      tft.print("ON");

      tft.fillRect(240,150,80,75,RED);
      tft.drawRect(240,150,80,75,WHITE);
      tft.setCursor(260,180);
      tft.setTextColor(WHITE);
      tft.setTextSize(2);
      tft.print("OFF");

    }

    void setup() {
      Serial.begin(9600);
      tft.reset();                            // Reset LCD
      tft.begin(0x9341);                      // Initialise LCD
      tft.setRotation(3);

      pinMode(led1, OUTPUT);
      pinMode(led2, OUTPUT);

      drawHomeScreen();

    }

    void loop() {
        TSPoint p = ts.getPoint();
        if (p.z > ts.pressureThreshhold) {
          p.x = map(p.x, TS_MAXX, TS_MINX, 0, 240);
          p.y = map(p.y, TS_MAXY, TS_MINY, 0, 320);
          pinMode(XM, OUTPUT);
          pinMode(YP, OUTPUT);
          Serial.print("("); Serial.print(p.x);
          Serial.print(", "); Serial.print(p.y);
          Serial.println(")");
    //    if (p.z > MINPRESSURE && p.z < MAXPRESSURE) {
    //      p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);
    //      p.y = map(p.y, TS_MINY, TS_MAXY, tft.height(), 0);

        //start button
        if (p.x > 38 && p.x < 108){
          if(p.y > 95 && p.y < 200) {
            touch = 1;
            }
         }

        //stop button
        if (p.x > 38 && p.x < 108){
          if(p.y > 205 && p.y < 310){
            touch = 2;
            }
          }

        //C1 ON button
        if (p.x > 150 && p.x < 225){
          if(p.y > 0 && p.y < 80){
            touch = 3;
            }
          }

        //C1 OFF button
        if (p.x > 150 && p.x < 225){
          if(p.y > 80 && p.y < 160){
            touch = 4;
            }
          }

        //C2 ON button
        if (p.x > 150 && p.x < 225){
          if(p.y > 160 && p.y < 240){
            touch = 5;
            }
          }

        //C2 OFF button
        if (p.x > 150 && p.x < 225){
          if(p.y > 240 && p.y < 320){
            touch = 6;
            }
          }

        //home button
        if (p.x > 10 && p.x < 40){
          if(p.y > 10 && p.y < 40){
            touch = 7;
            }
          }
      }
      if (touch == 1){
        tft.fillScreen(BLACK);
        tft.drawBitmap(200, 45, tankIcon, 120, 116,GREEN);
        tft.fillRect(10,10,30,30,GREEN);
        tft.drawRect(10,10,30,30,RED);
        tft.setCursor(120,160);
        tft.setTextColor(WHITE);
        tft.setTextSize(2);
        tft.print("Button 1");
        startSystem();
        //touch = 0;

        //return millis() - screen;
        }

      if (touch == 2){
    //    tft.fillScreen(BLACK);
    //    tft.setCursor(120,160);
    //    tft.setTextColor(WHITE);
    //    tft.setTextSize(2);
    //    tft.print("Button 2");
    //    touch = 0;
        stopSystem();
        }

      if (touch == 3){
    //    tft.fillScreen(BLACK);
    //    tft.setCursor(120,160);
    //    tft.setTextColor(WHITE);
    //    tft.setTextSize(2);
    //    tft.print("Button 3");
    //    touch = 0;
        digitalWrite(led1,HIGH);
        //touch = 0;

        }

      if (touch == 4){
    //    tft.fillScreen(BLACK);
    //    tft.setCursor(120,160);
    //    tft.setTextColor(WHITE);
    //    tft.setTextSize(2);
    //    tft.print("Button 4");
    //    touch = 0;
        digitalWrite(led1,LOW);
        touch = 0;

        }

      if (touch == 5){
    //    tft.fillScreen(BLACK);
    //    tft.setCursor(120,160);
    //    tft.setTextColor(WHITE);
    //    tft.setTextSize(2);
    //    tft.print("Button 5");
    //    touch = 0;
        digitalWrite(led2,HIGH);
        touch = 0;
        }

      if (touch == 6){
    //    tft.fillScreen(BLACK);
    //    tft.setCursor(120,160);
    //    tft.setTextColor(WHITE);
    //    tft.setTextSize(2);
    //    tft.print("Button 6");
    //    touch = 0;
        digitalWrite(led2,LOW);
        touch = 0;
        }
      if (touch == 7){
        drawHomeScreen();
        touch = 0;
      }
    }

    void drawBitmap(int16_t x, int16_t y,const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) {
      int16_t i, j, byteWidth = (w + 7) / 8;
      uint8_t byte;
      for(j=0; j<h; j++) {
        for(i=0; i<w; i++) {
          if(i & 7) byte <<= 1;
          else      byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);
          if(byte & 0x80) tft.drawPixel(x+i, y+j, color);
        }
      }
    }

      /*TSPoint p = ts.getPoint();
      boolean led_state = false;
      if (p.z > 10 && p.z < 1000)             // Check touch validity
      {
        p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);
        p.y = map(p.y, TS_MINY, TS_MAXY, tft.height(), 0);
        if (p.x > 0 && p.x < 240)
        {
          if (p.y > 0 && p.y < 160)
          {
            led_state = true;                 // Touched in Green rectangle
          }
          else if (p.y > 160 && p.y < 320)
          {
            led_state = false;                // Touched in RED rectangle
          }
        }
        Serial.print("LED State ");
        Serial.println(led_state);            // Print the status of the LED
      }
      delay (100);*/

**systemImages.c**

#include <avr/pgmspace.h>
````
// 'tankIcon', 120x116px
const unsigned char tankIcon [] PROGMEM = {
 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xf1, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x03, 0xff, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x03, 0xff, 0xe1, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x03, 0xf8, 0xfb, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xfc, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x01, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x01, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff,
 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff,
 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff,
 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff,
 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff,
 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff,
 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff,
 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff,
 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff,
 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff,
 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff,
 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff,
 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xe0, 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, 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, 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, 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, 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
};
````

title: Arduino LCD only display image for few second and turn screen to white

Answers: 0


body:
I fried 2 MKR Wifi 1010 after powering them using a solar panel.

Here is the diagram:

[![enter image description here][1]][1]

Both were working fine as long as I used the LiPo battery and/or my macbook (using USB) as power sources. They were correctly detected and I could upload sketches.

Once I plugged the Solar panel + Voltage regulator to the MicroUSB port of the arduino and waited for the solar panel to be selected as the power source by the board, then it would not be recognized by the IDE anymore.

First board is not recognized by MacOS and Arduino IDE. Double tap Reset button has no effect on the "L" LED that remains turned off.

Second board is recognized by MacOS (By looking at System Information > USB) but not by Arduino IDE. When it is powered up, CHRG blinks a few seconds, then "L" LED pulses indefinitely. Double tap Reset button just turns off the LED while the button is pressed, but goes back to pulsing on release.

The sensor connected to the I2C pins is able to deal with both 3.3V and 5V, so it should work when getting 5V from USB and 3.3V from battery.

What could have damaged these 2 boards ?

Edit:

The voltage regulator operates at DC 9V - 36V (not sure why it is also labelled as 24V/12V) and outputs 5.2V / 6A.
I measured the output voltage once when the sun was hitting the panel and it was 5.2V.

The full product description is available at https://www.jzk-jzk.com/products/24v-12v-to-5v-5a-power-buck-module-dc-dc-step-down-power-supply-converter-with-led

  [1]: https://i.stack.imgur.com/H3f5S.png

title: Fried 2 MKR Wifi 1010 after plugging them to a solar panel

Answers: 0


body:
I'm trying to print a txt file from an SD card to a SSD1306 using the u8x8 library.
Here's the current code:

    #include <SD.h>

    #include <Arduino.h>
    #include <U8x8lib.h>

    #ifdef U8X8_HAVE_HW_SPI
    #include <SPI.h>
    #endif
    #ifdef U8X8_HAVE_HW_I2C
    #include <Wire.h>
    #endif

      U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);

    /*
      This example will probably not work with the SSD1606, because of the
      internal buffer swapping
    */
    #define maxChar  128
    #define rows 8
    #define cols 16

    File myFile;
    int x = 0;
    int y = 0;
    char c;

    void setup()
    {
      /*Serial.begin(9600);
      Serial.print("Initializing SD... ");
      if (!SD.begin(10)) {
        Serial.println("initialization failed!");
        while (1);
      }
      Serial.println("initialization done.");*/

      u8x8.begin();
      delay(500);
      u8x8.setFont(u8x8_font_amstrad_cpc_extended_f);

      myFile = SD.open("target.txt", FILE_READ);
      u8x8.clear();
      u8x8.print("ciao");
      u8x8.print(myFile.read());
      delay(2000);
      printNewSet();
    }
    void loop()
    {

    }

    void printNewSet()
    {
      u8x8.clear();
      x = 0;
      y = 0;
      while (myFile.available() && y<rows)
      {
        c = (char) myFile.read();
        if (c == '\n') c = 'a';
        u8x8.print(c);
        stepCoords();
      }
    }

    void stepCoords()
    {
      x++;
      if (x >= cols) newLine();
    }
    void newLine()
    {
      u8x8.print('\n');
      x = 0;
      y++;
    }

The function `printNewSet()` is supposed to print a batch of characters until either the file ends or the display limit is reached.

The file displayed correctly until i switched from `while(myFile.available()) u8x8.print( (char) myFile.read());` to `printNewSet()`, at which point `myFile.read()` only returns -1 and `myFile.available()` is always false.

What is going wrong?

EDIT: While debugging i discovered that myFile fails to be initialized. Am I running out of memory?

title: File.read() always returns -1

Answers: 1

body: I had accidentally commented out the SD initialization along with the serial initialization. After uncommenting it it works correctly


body:
I want to connect NRf24 module with digispark and use USB capabilities at same time.
currently, i use this conexion diagram:

                   NC      PB5  1|o   |8  Vcc --- nRF24L01  VCC, pin2 --- LED --- 5V
    nRF24L01  CE, pin3 --- PB3  2|    |7  PB2 --- nRF24L01  SCK, pin5
    nRF24L01 CSN, pin4 --- PB4  3|    |6  PB1 --- nRF24L01 MOSI, pin6
    nRF24L01 GND, pin1 --- GND  4|    |5  PB0 --- nRF24L01 MISO, pin7

Bu my problem is that as you see in this diagram CE and CSN are in the USB + and - pins:
[![enter image description here][1]][1]
I just want that my module receive data so, i think that if i power up every time CE pin and i change CSN pin to PB5 this may work but, in fact this don't
I can't use 3 pin connexion because i don't have capacitor and my project is for Wednesday
Thanks in advance for your help

  [1]: https://i.stack.imgur.com/75F6S.png

title: NRF24 and usb digispark

Answers: 2

body: it is possible to use digispark with NRF24 and USB keyboard without use system that need capacitors as the tree cable solution? I just want to use the digispark as RX

body:
As per https://digistump.com/wiki/digispark/tutorials/basics:

*Pin 3 and Pin 4 (P3 and P4) are used for USB communication and programming, while you can use them in your circuit if you are not using USB communication, you may have to unplug your circuit during programming if the circuit would impede the pin states or dramatically affect the voltage levels on these pins.*


body:
I am trying to transmit the values of three potentiometers via the nRF24L01+ (w/antenna). I am using the regulator designed for the nRF24L01+, so I don't think I need to add a decoupling capacitor. I am using a data structure to send the POT outputs as bytes. On the transmitter end, the values of the data structure are correct. On the receiver, however, each value of the data structure is being received as 0. I have an if statement to verify if radio.available() and apparently the radio is available. If I change the wiring of either the receiver or the transmitter, the radio is not available, so I am assuming it is wired correctly. Plus, the regulator makes it pretty simple.

I have :
- CE = D7
- CSN = D8
- (and all the other mandatory pins 11, 12, 13 connected correctly) and D10 set to output with nothing connected. (I read on another post that D10 must be set to output to make it the SPI master, or something like that)...

I have been trying for days and can't seem to figure out what I'm doing wrong. Let me know if you need anymore information.

```C++
//Transmitter//
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

// Define the digital inputs
#define liftPOT A2  // Joystick button 1
#define thrustPOT A0  // Joystick button 2
#define rudderPOT A1   // Toggle switch 1

RF24 radio(7, 8);   // nRF24L01 (CE, CSN)
const byte address[6] = "00001"; // Address
// Max size of this struct is 32 bytes - NRF24L01 buffer limit
struct Data_Package {
  byte thrustPOT;
  byte liftPOT;
  byte rudderPOT;
};
Data_Package data; //Create a variable with the above structure
void setup() {
  Serial.begin(9600);
  // Define the radio communication
  radio.begin();
  radio.openWritingPipe(address);
  radio.setAutoAck(false);
  radio.setDataRate(RF24_250KBPS);
  radio.setPALevel(RF24_PA_LOW);

  // Set initial default values
  data.thrustPOT = 127; // Values from 0 to 255. When Joystick is in resting position, the value is in the middle, or 127. We actually map the pot value from 0 to 1023 to 0 to 255 because that's one BYTE value
  data.rudderPOT = 127;
  data.liftPOT = 1;
}
void loop() {
  // Read all analog inputs and map them to one Byte value
  data.thrustPOT = map(analogRead(A1), 0, 1023, 0, 255); // Convert the analog read value from 0 to 1023 into a BYTE value from 0 to 255
  data.rudderPOT = map(analogRead(A0), 0, 1023, 0, 255);
  data.liftPOT = map(analogRead(A2), 0, 1023, 0, 255);
  radio.write(&data, sizeof(Data_Package));

  int liftVal, thrustVal, rudderPOS;
  liftVal = map(analogRead(A2), 0, 1023, 0, 255);
  thrustVal = map(analogRead(A0), 0, 1023, 0, 255);
  rudderPOS = map(analogRead(A1), 0, 1023, 0, 255);
  Serial.print("Lift : ");
  Serial.print(data.liftPOT);
  Serial.print(" Thrust : ");
  Serial.print(data.thrustPOT);
  Serial.print(" Rudder : ");
  Serial.println(data.rudderPOT);
```
```C++
//Receiver//
    #include <RF24Network.h>
#include <RF24Network_config.h>
#include <Sync.h>

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Servo.h>

RF24 radio(7, 8);   // nRF24L01 (CE, CSN)
const byte address[6] = "00001";
unsigned long lastReceiveTime = 0;
unsigned long currentTime = 0;
Servo thrustESC;  // create servo object to control the ESC
Servo liftESC;
Servo rudder;
int thrustVal, liftVal, rudderVal;
// Max size of this struct is 32 bytes - NRF24L01 buffer limit
struct Data_Package {
  byte thrustPOT;
  byte liftPOT;
  byte rudderPOT;
};
Data_Package data; //Create a variable with the above structure
void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setAutoAck(false);
  radio.setDataRate(RF24_250KBPS);
  radio.setPALevel(RF24_PA_LOW);
  radio.startListening(); //  Set the module as receiver
  resetData();
  thrustESC.attach(6);
  liftESC.attach(5);
  rudder.attach(3);
  pinMode(10, OUTPUT);

}
void loop() {
  // Check whether we keep receving data, or we have a connection between the two modules
  currentTime = millis();
  if ( currentTime - lastReceiveTime > 1000 ) { // If current time is more then 1 second since we have recived the last data, that means we have lost connection
    resetData(); // If connection is lost, reset the data. It prevents unwanted behavior, for example if a drone jas a throttle up, if we lose connection it can keep flying away if we dont reset the function
  }
  // Check whether there is data to be received
  if (radio.available()) {
    radio.read(&data, sizeof(Data_Package)); // Read the whole data and store it into the 'data' structure
    lastReceiveTime = millis(); // At this moment we have received the data
    Serial.print("recieving");
  }
  // Controlling servos
  rudderVal = map(data.rudderPOT, 0, 255, 0, 50);
  rudder.write(rudderVal);
  // Controlling brushless motor with ESC
  // Lift propeller
  liftVal = map(data.liftPOT, 0, 255, 1000, 2000); // Map the receiving value form 0 to 255 to 0 1000 to 2000, values used for controlling ESCs
  liftESC.writeMicroseconds(liftVal); // Send the PWM control singal to the ESC

  // Thrust propeller
  thrustVal = constrain(data.thrustPOT, 130, 255); // Joysticks stays in middle. So we only need values the upper values from 130 to 255
  thrustVal = map(thrustVal, 130, 255, 1000, 2000);
  thrustESC.writeMicroseconds(thrustVal);
  Serial.print("Lift : ");
  Serial.print(data.thrustPOT);
  Serial.print(" Thrust : ");
  Serial.print(thrustVal);
  Serial.print(" Rudder : ");
  Serial.println(rudderVal);
}
void resetData() {
  // Reset the values when there is no radio connection - Set initial default values
  data.thrustPOT = 127;
  data.liftPOT = 1;
    data.rudderPOT = 127;
    Serial.println("reset");

}
```

title: nRF24l01+ Problems. Data is being recieved as 0

Answers: 1

body: In order to diagnose my proplem, I used the radio.isChipConnected() function. When the function returns 0, you have a wiring problem. If you are getting consistent high or low values, run the above function. If you return a 1, that means that the nRF24L01 is connected correctly and there is likely a software error. Simplify everything in the code to where only one simple thing is being transmitted and received. I would recommend starting small with nothing attached to the arduino other than the radio module. Once that is behaving properly, build up to your goal step by step, checking along the way. My mistake was soldering my entire set up directly to the arduino and then trying to troubleshoot.


body:
recently Ive set up an ESP8266 to control temperature and humidity in rooms, for this Im using DHT11 sensor, thats the basic code I have in order to check functionality in Arduino IDE

    #include "DHT.h"
    #define DHTPIN A0
    #define DHTTYPE DHT11

    DHT dht(DHTPIN, DHTTYPE);

    void setup() {
      Serial.begin(9600);
      Serial.println("DHT11 Testprogram");
      dht.begin();
    }
    void loop() {
      // Wait a few seconds between measurements.
      delay(2000);

      float h = dht.readHumidity();
      float t = dht.readTemperature();

      if (isnan(h) || isnan(t)) {
        Serial.println("Error");
        return;
      }

      Serial.print("Luftfeuchtigkeit: ");
      Serial.print(h);
      Serial.print("%\t");
      Serial.print("Temperatur: ");
      Serial.print(t);
      Serial.write('°');
      Serial.println("C");
    }
So far as I've checked the code seems to be all right and doesn't have any issues. The bottleneck might be the circuit although I checked twice and I don't really understand what the issue still might be.
[![esp8266 with dht11][1]][1]

  [1]: https://i.stack.imgur.com/7P3sX.jpg
the 3V is connected to the + and to the pull up resistor of the sensor which is 10K and A0 Pin according to the plan with data pin of the sensor as well as with a pull up resistor and G is connected to - of the sensor. I still get no response from the sensor, I even checked other 3 sensors and cannot understand what the issue might be, does anyone know a solution?

title: DHT11 sensor not working on ESP8266, no response

Answers: 0