text:
Powering ESP8266EX with batteries and a voltage divider
So I recently bought a ESP8266 chip, it requires 3V3 and a large current( around 210mA max which is more than that can be supplied by an arduino uno at least). I managed to connect it to my arduino uno and got it to operate in standby mode, but Wifi mode wouldn't work because it requires more power.
After reading multiple online articles, I've decided to construct my own power supply. I'm planning on hooking 3 AAA batteries in series(4V5) and then use resistors(of small values to decrease power loss) to construct a voltage divide which powers the chip.
My concern is that I have not seen a single person doing this online and this seems like a straight forward thing to do, which makes me worried. Did I miss something? Is my plan feasible?

See items like “5V 3.3V DC-DC Step-Down Power Supply Buck Module AMS1117 LDO” and “Mini MP1584EN DC-DC BUCK Adjustable Step Down Module” on ebay.  Also, two brand new alkaline AA batteries in series,will be adequately close to 3.3 V, or two C cells if available to you, or one 3.7V 18650 LIPO cell by itself

I wrote a whole blog article about why you can't do it: https://hackingmajenkoblog.wordpress.com/2016/08/30/why-you-cant-use-resistors-as-a-voltage-regulator/

if you want to implement jank, a couple inline diodes between +5v and Vin should drop the voltage to within the ESP's limits of 3.8-2.8v without a lot of heat and wasted current. A "buck converter" based on a switch-mode regulator would be far more ideal.

I've run an ESP01 off of 2 fresh AA batteries just fine; (1.6X2=3.2v; and even 2.8 is ok)

There's a good reason why you can't do this.
When you power something like an ESP, the current it consumes will vary over time, as it does different things. For the purposes of current consumption, you could model the device as a resistor  whose resistance varies (greatly) over time. When it's in sleep mode with the radio off, it might be a 10k resistor. When it's active with the radio on full power, maybe a 30ohm resistor.
A potential divider divides voltage according to the ratio of the resistances. You are talking about putting your ESP in parallel with one of the resistors. Putting two resistors in parallel creates a new resistor with a resistance lower than either of the two.
If you want to calculate the resistance of two parallel resistors, it's R = (R1 x R2) / (R1 + R2).
What values would you choose for the resistors in the potential divider?  You'd have to go for values much lower than 15ohm in order for the 'resistance' of the ESP not to greatly affect the behavior of the divider - say 5ohm in total. This would mean your divider alone would draw a current of 1A from a 5v supply.
Fortunately, voltage regulators and buck converters are easily and very cheaply available. I recently bought a pack of five 3.3v regulator modules from China, delivered for less than £2.
Alternatively, you can create a reasonably stable supply from a reference voltage with just a single NPN transistor, but I don't know offhand whether it would be good enough for this application.

An esp presents 16-65 ohms (4X) under normal conditions, but the allowed input swing is only 0.3X...

no, the swing relative from 3.3 to 3.8v and 2.8v (1v/3.3v); the official range of the ESP

i was just adding numbers to detail why a voltage divider won't work because the highly variable current draw would force a static divider to provide volts outside the acceptable range. If the ESP always used, say, 85-110ma, one could likely get away with a naive divider (heat excepted)

if means that the divider could only swing 30% of it's pre-programmed 3.3 voltage without issue; but how can one accomplish that when the resistance varies 400%? (one can't)

or, put another way, ~15% from the midpoint for a total range of 30% of the target. you can go 15% down or 15% up, but no more. 0.99v is the spread from 3.8 to 2.8... let me rewrite my comments to clarify, can you delete your responses and i'll follow suite with a to-the-point comment? ( i hate to gunk up a good answer)

Ok I see what you mean. You can do it, by putting the ESP in parallel with one of the resistors in the divider, but you have to use such low value resistors that you're drawing many watts.


text:
Scanning for I2C addresses
I'm trying to find the I2C address of an IMU plugged into my Arduino using the code from this URL: http://playground.arduino.cc/Main/I2cScanner.  However, the program stalls at this stage:

Why could this be happening?

Pull-up resistors present?

In all likelihood it's a hardware problem. Without more details it is hard to say what that might be. You might mention what device you are using exactly, and exactly what wiring you are using, including pull-up resistors.

When the I2C scanner stops, it halts in the function Wire.endTransmission. The cause is a hardware problem of the I2C bus. For example the SDA or SCL are shortcut to something or pull-up resistors are missing (as already mentioned by TisteAndii) or the sensor module is not powered.
I assume that the IMU module has already pull-up resistors for SDA and SCL on the module. Which IMU module is it ? How did you connect it ? Do you have other I2C modules to test the I2C bus ?

source: Stack Exchange

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

sort: votes


text:
Parse a large json response with ESP8266
I'm doing a project where my Arduino uses an external ESP8266 wifi module (with AT firmware) to send http requests and receive server response.
I'm trying to get an NBA scoreboard, and here's what my Arduino sends to ESP:
> AT+CIPSTART=0,"TCP","data.nba.net",80
0,CONNECT

OK

> AT+CIPSEND=0,103
SEND OK

> GET /data/10s/prod/v1/20190214/scoreboard.json HTTP/1.1
Host: data.nba.net
Connection: keep-alive

+IPD,0,1460:HTTP/1.1 200 OK..
.............................
...here comes the response...
.............................

Now the code works fine, and I'm able to get the json file needed. The problem is that the response is sometimes too long and the file gets truncated, thus the response is incomplete. The file itself is sometimes pretty large, but I only need a few numbers from it (current teams + current score). So my questions are:

I use readString() method (of SoftwareSerial object instance) to read the response. Is there a way to parse the response chunk by chunk without loading everything in my ESP memory?
Is there a way to limit the response?
Are there any alternatives to the method I'm using? Maybe parsing the website (nba.com or espn.com/nba) directly? If so, how can I do that?
Maybe there's a way to write a separate (free) online API to parse json, constraint the response and send the small version upon request?

PS. I tried doing the same without AT firmware, flashing the module with a code that used HTTPClient directly (with ESP8266WiFi.h and ESP8266HTTPClient.h libraries):
HTTPClient http;
http.begin(request);
if (http.GET() > 0) {
    response = http.getString();
}
http.end();

That didn't help much. I'm still running out of memory since I'm directly loading the response to memory with getString().
PPS. Just in case it matters, I'm using ATmega2560 and a small ESP-01 module (similar to this).

large ... you'll need to be more specific than large

@JaromandaX .... go here .... http://data.nba.net/data/10s/prod/v1/20190214/scoreboard.json

what data are you retrieving? ..... you probably already know this, but here is the API for anyone else reading this https://github.com/kshvmdn/nba.js/blob/master/docs/api/DATA.md .......... there may be another way to pull the data

No. You go there. How hard is it to quantify large

@JaromandaX, > 10 KB is what I would call large. I think above that it just ignores the rest of the response.

@jsotola nah, not really. I looked around it before. The scoreboard.json is the closest I really need, and it's way too large as there is a data on streaming etc (who needs that anyway :D).

Ok, so I was able to do this. Here's the workaround.
Let's say the GET response is a flat string containing large .json file with all the commas and curly brackets. The idea is to read it byte-by-byte and instead of storing it just find the key you need and extract its value.
We want to find the field containing, say, "97.5 FM" from http://data.nba.net/data/10s/prod/v1/20190223/scoreboard.json (that's at the very end), skip 3 bytes (which is just " | ") and then read and Serial.print 4 bytes (which is "1280")*. We would do something like this (of course make sure to connect to wifi and include <ESP8266HTTPClient.h>:
HTTPClient http;
http.begin("http://data.nba.net/data/10s/prod/v1/20190223/scoreboard.json");
int httpCode = http.GET();
if (httpCode == HTTP_CODE_OK)
  Serial.println(getValue(http, "97.5 FM", 3, 4));

where the getValue() function is defined as follows:
String getValue(HTTPClient &http, String key, int skip, int get) {
  bool found = false, look = false;
  int ind = 0;
  String ret_str = "";

  int len = http.getSize();
  char char_buff[1];
  WiFiClient * stream = http.getStreamPtr();
  while (http.connected() && (len > 0 || len == -1)) {
    size_t size = stream->available();
    if (size) {
      int c = stream->readBytes(char_buff, ((size > sizeof(char_buff)) ? sizeof(char_buff) : size));
      if (len > 0)
        len -= c;
      if (found) {
        if (skip == 0) {
          ret_str += char_buff[0];
          get --;
        } else
          skip --;
        if (get <= 0)
          break;
      }
      else if ((!look) && (char_buff[0] == key[0])) {
        look = true;
        ind = 1;
      } else if (look && (char_buff[0] == key[ind])) {
        ind ++;
        if (ind == key.length()) found = true;
      } else if (look && (char_buff[0] != key[ind])) {
        ind = 0;
        look = false;
      }
    }
  }
  return ret_str;
}

You can call this getValue() whatever many times you like, but the strings you're looking for need to be only after each other, because the response to GET is read byte-by-byte just once.
There is probably (i.e., most likely) a better way of doing this, but this approach works and it's pretty fast, so...

* This, of course, is just an example, and you can overload this getValue() function definition to, say, read until it gets a curly bracket or whatever.

Check out the Streaming JSON Parser. It's designed to parse large JSON objects on processors with little memory. You'll just read one character at a time from the HTTP connection rather than the whole response; pass the character to the library and it'll call code you provide every time it sees an array, object, key or value. Then you can extract just the pieces you want without the overhead of loading it all in memory at once.
The library has good examples that'll show you how to use it.

Thanks, I've seen this before, but I'm not completely sure how this works. (a) In the example, in ESP.getFreeHeap(), is ESP the software serial instance? (b) What should I actually feed to the parse.parse(...)? Is it the http.getString() return?

ESP.getFreeHeap() is a diagnostic function. It returns how much memory is left to allocate. The example calls it to prove that the parser isn't leakimg or running out of memory. In the example it should be the same before and after running the parser. ESP is a special class with functions for dealing with the ESP8266 processor. You don't need to deal with any of the ESP functions. You need to read a single character at a time from your HTTP client and then feed each character to parse.parse().

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


text:
Do I need a pull-up/down resistor for button LED circuit?
When reading up on how to make a circuit that turns an LED on when a button is held down, I keep finding people saying a pull up or down resistor must be involved, to avoid the flickering state of the LED seen with a floating pin. There's also code being implemented, where the state of a pin is read and monitored as the button is pressed down or left raised. What I don't understand, is why this is all necessary. Surely it isn't, considering the circuit below allows the button to be pressed with the LED turning on/off depending on the state of the button.

I made this circuit before drawing it online, and it works exactly as intended. No need for a pull up/down resistor or any code. I must be missing something here, can anyone please explain? It works perfectly with a buzzer as well.
Many thanks.

That problem of turning an led on when a button is pressed is a nice first exercises for getting started with learing arduino, as it makes you learn how to read an input pin, and how to turn on an output pin, and make an led light. What you are doing is sidestepping the whole Arduino part. There isn't anything wrong with that, as as you said, it work the way you want it to work. But you haven't learned anything about inputs and outputs.

your arduino is not doing anything other than supplying power to the LED ..... you can replace the arduino with a battery

The circuit you have made is only using Arduino as a 5V power source. You aren't using any GPIO pins to read the state of the button or to control the LED by an output pin. You've just made a plain-old circuit with a button and LED in series with a power source.
Often for a button-controlling-LED sketch, you will have a button connected between GND and an I/O pin defined as an INPUT_PULLUP, which means the Arduino will be able to read the state of the pin as HIGH (5V) or LOW (0V). The PULLUP part indicates that when the button is not completing the circuit between GND and the pin, a weak voltage is applied to get it up to 5V. In this way it's not "floating" at an unspecified voltage, but is being actively driven to 5V. When you press the button, the input pin is shorted to GND.
A pull-up resistor causes an otherwise un-driven pin to go to logic HIGH. A pull-down resistor causes an otherwise un-driving pin to go to logic LOW.
In the case of a pull-up resistor, reading a logic LOW means the button is pressed, which is kind of the reverse of your circuit operation, so in your sketch code, you would look for LOW to turn on the LED.

No, you don't.
The thing to remember is that you don't put a pulldown (or pullup) resistor on the button - you actually put it on the input.
And since you aren't using an input there is nowhere to put the resistor.
A pullup or pulldown resistor is used to set an input to a pre-defined state. The button or switch is then used to override that pre-defined state.  With your circuit you are just controlling the flow of electrons around a simple loop, from power, through resistor, through LED and back to power. The button just completes that circuit.  There is no "input" to place into a pre-defined state. Hence no pullup or pulldown resistor.

A series resistor is needed to prevent excess current thru the LED or thru the IO pin. 270 ohm to 1K ohm works well.

simulate this circuit – Schematic created using CircuitLab
The internal pullup in the Arduino processer is 30-50K ohm. The external resistor is a current limit resistor. (5V - Vf-led)/resistor = current.
(5V - 2.2V)/270 ohm = 10.3mA. Vf of the LED will vary by color from say 2.2V for a Red to 3.5V for a blue or white.  Insert values if known, or use a 270 to 1K resistor and measure Vf across the LED, then adjust resistor as needed for desired brightness (more current = brighter).

270Ohm pull-up? Isn't that a bit excessive? That would result in 18.5mA of current when the button is pressed, which is a bit wasteful.

See additonal explanation above.

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


text:
Changing Uid Using MFRC522 Via Arduino Error
Well, I' ve just bought and recieved a MFRC522 rfıd module and done to much research on it. After watching several videos, I sorted out a library for using this module via arduino.
You can click the first link below to be navigated to Miguel Balboa' s github page including the library that I mentioned and example codes written by him using that library. Though I' ve downloaded the zip file, ran such codes as dumpInfo, read and write, unfortunetely I couldn' t made "changeUid" example work. U can reach this example code via the link below as well. My connection is true, I' m sure bout' that  If anybody had faced this kind of problem or knows the solution, their answers will be enough satisfying for me I guess... (By the way, error was this sentance: Are you sure this is a uid changeable card -I was sure, my card was a Mifare 1K card- failure, the card responded as NAK)
link: https://github.com/miguelbalboa/rfid

Search for UID changeable card. The kit included this RFID reader just had a normal RFID card and keychain. You will probably have to buy it yourself. I bought it from aliexpress but I don' t remember which seller. Good Luck! (I mean who read this...)

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


text:
Custom arduino board
Hey There Arduino Coders. I am a relatively seasoned C/C++ programmer. However, I'm still new to the Arduino Game. I'm coming here today to ask you guys a direct question that I couldn't find a direct answer for on google... here it goes:
Is it possible,(also practical) to create my own arduino board? after creating a prototype with an arduino uno and various shields?
In other words. Is it possible to shrink the arduino(make a custom arduino), and all of its shields on to one board? It seems rather large to have to lug around all of those shields and such. CHEERS!

What shields do you want? Depending on the shields you use, a better option might be to start by analysing how to reduce the shields, and then decide how to connect and control them.

Hypothetically speaking. An Ethernet shield.

It might help folks give a good answer if you update your question with the specific shields you'd like. So add Ethernet, and anything else you need.

I have a page about a breadboard Arduino which is basically an Atmega328P processor (same as in the Uno, inter alia) on a breadboard.

Also a wire-wrapped Arduino.

You can go pretty minimalistic with a ATtiny85 mounted on a button battery like this:

Is it possible to shrink the arduino(make a custom arduino), and all of its shields on to one board?

Ah there you might be asking a bit much. There are hundreds, if not thousands, of shields people have designed for it. Certainly you can make up your own board to meet a specific purpose.

Hey thanks alot Pal ... This is helpfull!!!!!!

If the shield schematics of the shields you want to use are publicly accessible and you can get the parts, you should be able to build many of the available shields on a perfboard, for example

Absolutely.  You might start with the Arduino to Breadboard Tutorial while defining your hardware requirement - for example, decide what voltage you are going to run at (and pick an appropriate regulator) and then decide if you can use the imprecise 8 MHz internal oscillator or if you need a more precise external resonator or crystal.
Once you have determined your required circuitry you can advance to making  circuit board, and possibly switch from the DIP version of the ATmega to a QFP package which is smaller and potentially ultimately easier to work with (for production you might even use a QFN, though that is a bit more challenging to solder by hand).  You may also want to look at what package technology your peripheral chips come in.
Do note though both that you can buy smaller premade Arduion-compatible PCBs, and that there are other chips which are worth considering for a permanent project, some with Arduino compatible libraries available, and some without.

Could you name some of those "other chips?" I'm curious.


text:
uint8_t etc as color variable
I am very new to coding and I am attempting to teach myself the best I can.  I have no prior knowledge of coding and am filling in the blanks via YouTube and forums alike.  One place I keep getting hung up on is what seems to be an unsigned integer.
I have tried to figure out how these work (assignment and such) to no avail. I was wondering if anyone could offer some insight for me or at the least a link that gets specific for the Arduino.
I see them used as uint8_t, uint16_t, and uint_32 in various places.  Am I correct that it is an unsigned integer?  Meaning it is a whole positive number only.
The code I have attached is from Adafruit's article on multi-tasking.  I am trying to adapt my sketch for millis() over delay().
      uint32_t Color1, Color2;  // What colors are in use
      uint16_t TotalSteps;  // total number of steps in the pattern
      uint16_t Index;  // current step within the pattern

For instance: on the variable declarations they use these for the color.  I will need to change the colors, but have only seen them expressed in RGB.  They are in every sketch I see, but I am struggling to answer this question on my own.  Thanks in advance for any help.

If you search for information about C types on the internet, there will be much help to find, but effectively you are correct. One format of integer types in C take the form:
uint / int: Signed or unsigned integer. Unsigned integers are stored in simple binary representation, and signed integers are stored in two's complement form.
8 / 16 / 32 / 64: The number of bits to store the value. This means the number of possible values is 2x where x is the number of bits.
_t: Simply a suffix to indicate that it is a type name, not a variable.

Colour storage
Colours are generally stored as three components: red, green and blue (or sometimes four, adding alpha, the degree of transparency).
If each component is given an unsigned byte to be stored (so it has a value from 0–255), then the total colour size is 24 bits. However, 24 bit integers are not a standard size, so the next bigger size is selected, 32-bit. This also allows room for an alpha component if necessary, but otherwise the spare 8 bits are unused.
For example:
| 00000000 | 00000000 | 00000000 | 00000000  | = 32 bits
| red      | green    | blue     |alpha/empty|

Thank you so much for this. The breakdown helps to simplify it for me.

Everything about standard integer types is in <stdint.h>


text:
expected ';' before '{' token error
I am trying to figure out what I did wrong in my sketch.  In my void loop(), at the very bottom of the sketch, my if/else statement keeps compiling with the above error.  Originally, it was an if/else if/else statement.  I had the current else's an else if and the Update in my else.  Someone had corrected me on it and i removed the code and made the proper changes and the error started. Now, just for the sake of my sanity I went ahead and put the ';' at the end of my else, which I know is wrong, just to see if it compiled, which it did.  I ran the sketch and sure enough it broke the operation. I cannot figure out what it is looking for.  Any help would be appreciated.
    //ASHPD Barrel Version 4.0.2 (adding pulse) Created By Gixxerfool 01.11.2016

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

// Pattern types supported:
enum  pattern {NONE, CHASE, PULSE};

#define orange 255,128,0
#define blue 0,0,255

char targetColor = '0,0,255';

// NeoPattern Class
class NeoPatterns : public Adafruit_NeoPixel
{
  public:

    // Member Variables:
    pattern  ActivePattern;  // which pattern is running

    unsigned long Interval;   // milliseconds between updates
    unsigned long lastUpdate; // last update of position

    uint32_t Color1;  // What color is used
    uint16_t TotalSteps;  // total number of steps in the pattern
    uint16_t Index;  // current step within the pattern

   // Constructor
    NeoPatterns(uint16_t pixels, uint8_t pin, uint8_t type)
    :Adafruit_NeoPixel(pixels, pin, type)

{

}
    // Update the pattern
    void Update()
    {
      if ((millis() - lastUpdate) > Interval) // time to update
      {
        lastUpdate = millis();
        switch (ActivePattern)
        {
          case CHASE:
            ChaseUpdate();
            break;
           // case PULSE:
            //PulseUpdate();
            //break;
          default:
            break;
        }
      }
    }

    // Increment the Index and reset at the end
    void Increment()
    {
        Index++;
        if (Index >= TotalSteps)
        {
          Index = 0;
        }
      }

    // Calculate 50% dimmed version of a color (used by ChaseUpdate)
    uint32_t DimColor(uint32_t color)
    {
        // Shift R, G and B components one bit to the right
        uint32_t dimColor = Color(Red(color) >> 1, Green(color) >> 1, Blue(color) >> 1);
        return dimColor;
    }
    // Returns the Red component of a 32-bit color
    uint8_t Red(uint32_t color)
    {
        return (color >> 16) & 0xFF;
    }

    // Returns the Green component of a 32-bit color
    uint8_t Green(uint32_t color)
    {
        return (color >> 8) & 0xFF;
    }

    // Returns the Blue component of a 32-bit color
    uint8_t Blue(uint32_t color)
    {
        return color & 0xFF;
    }

    // Initialize for a CHASE

void Chase(uint32_t color1, uint8_t interval)
    {
        ActivePattern = CHASE;
        Interval = interval;
        TotalSteps = (numPixels());
        Color1 = color1;
        Index = 0;
    }

    // Update the Chase Pattern
    void ChaseUpdate()
    {
        for (int i = 0; i < numPixels() + 1; i++)
        {
            if (i == Index)  // Scan Pixel
            {
                 setPixelColor(i, Color1);
            }
            else // Fading tail
            {
                 setPixelColor(i, DimColor(getPixelColor(i)));
            }
        }
        show();
        Increment();
    }

//Initialize for a pulse
void Pulse(uint32_t color1, uint8_t interval)
    {
      ActivePattern = PULSE;
      Interval = interval;
      TotalSteps = 256;
      Color1 = color1;
      Index = 0;
    }

    //Update the Pulse
    void PulseUpdate()
   {
   for (int h = 0; h < 256; h++)
    {
    for (int i = 0; i < 126; i++)
     {
      for (int j = 0; j > -1; j--)
      {
      if (h == Index)
      {
      setPixelColor(i, Color1);
      }
      else
      {
      setPixelColor(j, Color1);
      }
    }
    show();
    Increment();
   }
  }
}

};
// Define some NeoPatterns

NeoPatterns Ring3(16, 4, NEO_GRB + NEO_KHZ800);
NeoPatterns Ring2(12, 1, NEO_GRB + NEO_KHZ800);
NeoPatterns Ring1(7, 0, NEO_GRB + NEO_KHZ800);

// Initialize everything and prepare to start

void setup()
{
  // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
  if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
  // End of trinket special code

pinMode(2, INPUT); //Sets pin 2 as an input

  // Initialize all the pixels

  Ring1.begin();
  Ring2.begin();
  Ring3.begin();

  //Set all pixels to off

  Ring1.show();
  Ring2.show();
  Ring3.show();

  ring3Wipe(Ring3.Color(blue), 50); // Wipe ring 3 in blue once
  ring2Wipe(Ring2.Color(blue), 50); // wipe ring 2 in Blue once
  ring1FadeUpBlue(Ring1.Color(blue)); //Fade in ring1 once

  //Start the idle pattern
  //Name.PatternName(Name.Color(targetColor), Interval) Changing Interval will adjust the speed of the pattern
  Ring1.Pulse(Ring1.Color(blue), 500);
  Ring2.Chase(Ring2.Color(blue), 55);//keep the interval 15ms above ring3 for synchronicity
  Ring3.Chase(Ring3.Color(blue), 40);//keep the interval 15ms below ring2 for synchronicity

}
    void ring1FadeUpBlue(uint8_t wait)
    {
   for(int j = 0; j < 255; j++)
   {
      uint32_t color = Ring1.Color(0, 0, j );  // ramp up the blue only
      for(uint16_t i=0; i < Ring1.numPixels(); i++)
      {
         Ring1.setPixelColor(i, color);
      }
      delay(7);
      Ring1.show();
   }
}
//wipes the ring2 once in blue
void ring2Wipe(uint32_t c, uint8_t wait)
{
    for(uint16_t i=0; i < Ring2.numPixels(); i++)  //This for loop runs reverse to ring3 loop
   {
      Ring2.setPixelColor(i, c);
      Ring2.show();
      delay(wait);
   }
}

//wipes the ring3 once for the color blue
void ring3Wipe(uint32_t c, uint8_t wait)
{ //uint32_t and uint8_t are the colorWipe parameters c=color wait=#of ms between pixels. larger # slows the action
    for(uint16_t i=0; i < Ring3.numPixels(); i++)
   {
      Ring3.setPixelColor(i, c);
      Ring3.show();
      delay(wait);
   }
}

// Main loop
void loop()
{
  // Update the rings.
  Ring1.Update();
  Ring2.Update();
  Ring3.Update();

  // check for button press:
  if (digitalRead(2) == LOW) // Button is pressed
  {
    Ring3.Color1 = Ring3.Color(orange);//Change the target color to orange
    Ring2.Color1 = Ring2.Color(orange);
    Ring1.Color1 = Ring1.Color(orange);
  }
  else (digitalRead(2) == HIGH)//Kicks the color back to blue after the button is let go
  {
    Ring3.Color1 = Ring3.Color(blue);//Change the target color back to blue
    Ring2.Color1 = Ring2.Color(blue);
    Ring1.Color1 = Ring1.Color(blue);
  }
}

For starters change "else (digitalRead(2) == HIGH)" to "else if (digitalRead(2) == HIGH)" in loop().

Also take a long look at the definition of targetColor.

Thank you for your response, I am very new to this and am teaching myself on the fly.  I went back and eliminated the char altogether.

The if-else construct is incorrect.
It needs to be like this:
if (condition)
{
    //actions
} else {
    //other actions
}

Which reads: if the conditions are true, then do actions, otherwise do other actions.
OR it can be like like this
if (condition)
{
    //actions
} else {
    if (other condition){
    //other actions
   }
}

Which reads: if conditions are true, then do actions, otherwise, if other conditions are true, then do other actions.  Note that in this structure, if neither conditions or "other conditions" are true, then we do nothing.
So if DigitalRead can only be HIGH or LOW, then you don't need condition that in the "else" statement.  Your code can look like this:
 // check for button press:
  if (digitalRead(2) == LOW) // Button is pressed
  {
    Ring3.Color1 = Ring3.Color(orange);//Change the target color to orange
    Ring2.Color1 = Ring2.Color(orange);
    Ring1.Color1 = Ring1.Color(orange);
  }
  else
  {
    // digitalRead(2) must be HIGH if it's not LOW
    //Kicks the color back to blue after the button is let go
    Ring3.Color1 = Ring3.Color(blue);//Change the target color back to blue
    Ring2.Color1 = Ring2.Color(blue);
    Ring1.Color1 = Ring1.Color(blue);
  }

Only if digitalRead could return another value (e.g. 3, 100, 75 etc) then you would need the other conditions in your else clause, but the code would need to look like this:
 // check for button press:
  if (digitalRead(2) == LOW) // Button is pressed
  {
    Ring3.Color1 = Ring3.Color(orange);//Change the target color to orange
    Ring2.Color1 = Ring2.Color(orange);
    Ring1.Color1 = Ring1.Color(orange);
  }
  else
  {
    if (digitalRead(2) == HIGH)//Kicks the color back to blue after the button is let go
    {
      Ring3.Color1 = Ring3.Color(blue);//Change the target color back to blue
      Ring2.Color1 = Ring2.Color(blue);
      Ring1.Color1 = Ring1.Color(blue);
    }
  }

Note: you don't actually need the braces around the second "if" statement there, but it makes the structure more clear.

Ok.  While I knew the first explanation, or thought I did, I thought I had tried this already.  Eliminating the condition fixed it.  I must have eliminated the condition and forgot to remove the if after else and got me turned around.  Thank you.  I can't vote your explanation up, but you made it very clear. as I mentioned to @Mikael Patel I am teaching myself on the fly.

No worries @Gixxerfool - good on you for teaching yourself and having a go - there's certainly no harm in that.

This makes no sense - you can't store 7 characters in the space of one character:
char targetColor = '0,0,255';

You're lacking an "if" here:
} else (digitalRead(2) == HIGH) { //Kicks the color back to blue ...

You have numerous sign mismatches in comparisons.

Could you expand on what you mean by the sign mismatches? Thank you.

There are places where (especially in for loops) you define an int (signed) and then compare that to the return value of a function which is an unsigned value (eg numPixels()). That causes warnings if you have warnings turned on. 99.99999% of the time it is fine, but it's just something to be aware of because it can cause problems in some cases. Highly unlikely in your case, but still something to watch.

Ok. That makes perfect sense.  I guess since I never had a conflict, I never paid attention. Definitely something I will be more conscious in the future of that.  Thank you for the tip. Any help is always appreciated.


text:
Is there any way I can connect the RAM of a computer to Arduino?
I was thinking about a way to reuse the RAM of my old computer on my Arduino board. I was thinking about some peojects using neural networks, and more RAM would let the Arduino use more neurons.
So that's my question, how could I do that? Maybe soldering some cables to Tx/Rx pins and creating and interface between the board and the memory?

Not practically and especially not cost effectively.  If you want more memory, choose something which has it, not an Arduino.  Cheap embedded Linux boards will tend to have tens to today hundreds of megabytes, and systems with gigabytes are available.  If you only need 200K or so look at some high-end single chip ARM Cortex M4 parts, some of which may be able to run Arduino ports.

No.  And welcome to Arduino SE.  Be sure to take the tur at https://arduino.stackexchange.com/Tour

No, you can't connect your normal desktop computer memory to your Arduino. For a number of reasons:

Computer memory (at least for the past 20 years) is DDR SDRAM. That's Synchronous Dynamic RAM. It requires very strict timing and synchronous (clock based) data transfers with clocks measured in the hundreds of MHz - something the Arduino cannot do.
You need lots and lots of I/O pins to interface with SDRAM. I mean, just look at all those pins - how would you connect all those up to a little Arduino?
Being DRAM you need to use quite a complex process to keep the data refreshed and stop the capacitance of each cell from draining away. Yes, that side of things is do-able, but not child's play.

The only way you will be able to interface DDR SDRAM with an Arduino is through some intermediate interfacing system that can do all the above for you. Your best candidate is to design an SPI to DDR conversion chip using an FPGA and Verilog or VHDL. That way you can communicate with the FPGA using SPI (or you could choose I2C if you like, or a simple 8-bit parallel protocol) and the FPGA then does all the grunt work that the Arduino isn't capable of.
However, while you're at it, you may as well put a CPU core in the FPGA (e.g., NIOS II or something) and do away with the Arduino altogether...

Or OpenRISC.

I know this is old, but it comes up on Google so here I am.
Forget about connecting any kind of modern computer RAM to an Arduino. Period.
However, an old school SIMM from the 80's/early 90's is very much possible to use with some effort and they're cheap enough to buy on eBay. These are the ones you would have usually found on a 386/486 or early Pentium system.
Here is an example: http://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bit
There are much easier and more cost-effective ways to add RAM to your 8-bit Arduino though. Look up SPI RAM. That's probably what you want. It's only a 4 pin connection, and numerous libraries already exist to interface with them.

If you try hard enough it might work, but it will not be easy.
In general there are 2 types of RAM.  Static and Dynamic.  You can cram a lot more memory into a Dynamic RAM chip so that is what is most likely in your computer. And probably what you are asking about in your question.
Dynamic memory needs to be refreshed continuously.  Otherwise the data will be lost.  This is such a repetitive and time consuming process that special hardware is used to relieve the processor of this task.  In general, embedded processors such at the Atmel (used in most Arduinos) do not have such specialized hardware.
So it will be (very) difficult to use your computer memory in your Arduino.
That said, there are some specialized RAM chips that you can use with your Arduino.  But they likely do not look like the memory chips in your computer.


text:
How can I use wifi to wirelessly communicate (and wirelessly code if possible) between multiple arduinos?
I am using arduino as the base for an accelerometer project - the end goal is to have multiple arduinos with accelerometer chips that can wirelessly start and stop collecting data and wirelessly send this data back to the "base" arduino (which will be connected to a computer).  Currently we have only two arduinos communicating to test a lot of this, and currently are using a bluetooth node to wirelessly code the accelerometer arduino and Rf nodes to wirelessly send the data back to the arduino connected to a computer which then prints the data it is collecting.  How could we replace this with a wifi network?

https://www.arduino.cc/en/Main/ArduinoBoardYun and https://www.arduino.cc/en/Tutorial/ArduinoISP

Sending data to a computer using WiFi is simple enough and there are plenty of examples. The simplest way is to set up a web server on the computer and use HTTP POST to send the data. There are "lighter" ways but entail more coding.
You won't do OTA updates on a normal Arduino. Yes, you could use a Yún, but they aren't always the best choice - the Linux side of things does make it a very "heavyweight* board.
You may be better off using an ESP8266 based system (not wired to an Arduino, but standalone) and programming it direct. Maybe a NodeMCU or something similar.  The Arduino core for ESP8266 supports OTA programming direct from the Arduino IDE.


text:
use more then one timer
I'm working on Arduino uno and trying to use more then one timer.
I'm using timer1 for my software watchdog (I needed bigger interval for that, so my program won't reset itself after 8 seconds).
In addition, I'm using timer2 for regular interrupt like turn off pin after 8 seconds.
The problem is that the timer1's interrupt override timer2's interrupt.
Is it possible to to use both of them?

No, timer1's interrupts do not override timer2's interrupts.

Why are you using a timer for the watchdog instead of the normal watchdog timer in interrupt-and-reset mode?

Could you post some code, so we could see why the timer1 interrupt might override the timer2 interrupt?

In general, once an embedded processor's interrupt fires, the interrupt routine clears the interrupt.  Usually inside the interrupt routine.  Failure to clear the interrupt normally inhibits further interrupts.
That said, in the Arduino paradigm, this is "taken care of" by the Arduino Timer library described here.  In the example code:
/*
 *  Timer1 library example
 *  June 2008 | jesse dot tane at gmail dot com
 */

#include "TimerOne.h"

void setup()
{
  pinMode(10, OUTPUT);
  Timer1.initialize(500000);         // initialize timer1, and set a 1/2 second period
  Timer1.pwm(9, 512);                // setup pwm on pin 9, 50% duty cycle
  Timer1.attachInterrupt(callback);  // attaches callback() as a timer overflow interrupt
}

void callback()
{
  digitalWrite(10, digitalRead(10) ^ 1);
}

void loop()
{
  // your program here...
}

...you can see that the example does not actually contain "the" Timer interrupt routine but rather a callback() routine which the Timer library calls when the Timer interrupt occurs.  Code to clear the Timer interrupt is missing and assumed to be in the Timer library.
Consider this if you are writing you own interrupt routine instead of using the Arduino's Timer library.
I'm going to have to call foul on myself.  Clearing interrupts in their own interrupt routine is very common.  But looking at this page, where the Atmel timer hardware is directly controlled (that is, the normal Arduino Timer library is not being used) and the real interrupt handler exists in the sketch, I see where this is not done.  So, for the Atmel, there must be at least one timer mode where the timer interrupt does not have to be clear for the interrupt to happen again.
If you are using the Arduino's Timer library consider this warning from the Timer's library web page linked to above:

Be careful about trying to execute too complicated of an interrupt at
  too high of a frequency, or the CPU may never enter the main loop and
  your program will 'lock up'.

Finally, hardware timed interrupts are normally reserved for operations which are time sensitive and occur much faster than executing code can handle.  For events that happen on the order of seconds, most applications setup 1 timed interrupt to count off a convenient interval.  Say 1 second.  Code is used to keep count and call the proper functions at the intended time.

On the AVR microcontrollers (and the Uno is AVR-based) most interrupt flags are cleared by the hardware when it executes the corresponding interrupt vector. This is the case for all the interrupts generated by the timers in all of their modes.

@Edgar Bonet, thanks.  That does appear to go against what other embedded processor makers do.  At least that's been my experience.  So not clearing the interrupt is not Rotem problem.  Maybe he is doing too much in the interrupt.  But at 8 seconds intervals, I doubt it.  So it looks like we need Rotem to show us his code if we are to help.

@IgnacioVazquez-Abrams: What architecture are you talking about? On the AVR, for most interrupt flags, the datasheet states (emphasis mine): “[The interrupt flag] is cleared by hardware when executing the corresponding interrupt handling vector. Alternatively, [the interrupt flag] is cleared by writing a logic one to the flag.” Note that the “vector” is the jmp to the ISR located in the interrupt vector table, thus it is executed before the ISR proper.


text:
Is my board broken by soldering?
I've soldered a featherwing on my feather, then unsoldered it because it had stopped working: after the soldering of the featherwing, I was unable to upload new software to the board.
But now that the featherwing was removed, I still can't upload a software onto the board.
Here's the complete log I get:
$ ~/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C~/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/arduino_build_190205/Blink.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "~/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "~/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

I used to have this error from time to time before, but I always was able to make it work, either by using another USB port, choosing the right port for the arduino or rebooting Linux, but now nothing I do works.
So, I think I might have broken the board because of the soldering/unsoldering.
I attached the pictures of both sides of the board.

Three LEDs continue to blink: the red one when I connect the board to the USB, the battery one and the RX one when there is an attempt at transmission.
Can you tell me whether the board looks damage?

no, it does not look damaged, but it does look like it needs a cleaning ...... is that really the question that you want to ask?

Well, I'd like to know if it looks like a hardware issue (maybe there's soldering that prevents the upload of a sketch or something else).

look for bits of solder that may be bridging adjacent copper traces ..... the pictures are not clear enough to do that ...... you have also left out important information ..... it is unknown how the featherwing was connected

What type of soldering paste / flux are you using?

It looks like you have soldering paste all over the circuit board. If enough paste bridges a gap between the ceramic resonator and the IC, it can attenuate the oscillator signal to the point where the board won't work.
I use an old tooth brush and Isopropyl alcohol to clean excess soldering paste. As the alcohol evaporates, a lot of moisture forms on the circuit board, so it's important to ensure it's completely dry before you power it up.
Try cleaning the circuit board and see if that fixes the problem.
EDIT:
I would like to show you how much soldering paste it takes to stop a 328P from working. The following image shows the bottom of a perfboard with 0.1" hole spacing. You can see the soldering paste bridging the gap between pins 8, 9, and 10 of a Atmega328P DIP IC. Pin 8 is ground, and pins 9 and 10 are connected to the crystal / capacitors. All three pins are connected together via the paste, and since I forgot to clean the board before "final assembly", it's possible other pins are connected together via the paste.

The circuit board is from a "kitchen clock project", and was taken the day it stopped working. There are no mechanical connections to this circuit board except for the 328P's IC socket. This clock worked for 3 months, then it quit suddenly. I re-booted it once, it worked for an hour, then it quit again. The only factor that changed after the first three months was a change of seasons (the ambient temperature in the kitchen was reaching 90+ degrees F during the day). I don't know if the "blobs" of paste were touching each other when I assembled it, but they were when it failed. How does thick soldering paste start moving around on it's own? With some heat and Capillary action of course :)
Cleaning the board with Isopropyl alcohol fixed the problem, and the clock has been running for the past 6 months without issue.
EDIT 2
When I monitor pin 9 of a 328P on a 5V Arduino Uno, this is the waveform I see.

You can see the small amount of voltage change the oscillator has to make for the 328P to sense it, and function correctly (800mV peak to peak). If the soldering paste is conductive, capacitive or perhaps both, connecting this signal through the paste to ground, power or several other pins can disrupt the signal to the point where the IC fails to operate.

"If enough paste bridges a gap between the ceramic resonator and the IC, it can attenuate the oscillator signal to the point where the board won't work."  Can you please backup your comment. Why do you think this would affect the 26MHz signal? Or is this only your opinion?

What 26MHz signal are you referring to? The OP is using an Adafruit Feather 328P running at 8MHz / 3.3V: https://learn.adafruit.com/adafruit-feather-328p-atmega328-atmega328p/overview My answer is not an opinion, it's a fact, and it happened to me. Excess soldering paste that bridges the gap between GND and the oscillator circuit can attenuate the signal to the point where the board stops working. No oscillator means no "uploading" either. I will edit my answer to provide proof.

My mistake I thought the Feather was a ESP8266 board. Then excessive flux on the board certainly had nothing to do with the failure. As far as the white residue, yes that is typical of a no clean flux. I have worked for electronic manufactures for the past 35 years. The past 33 designing electronic hardware. When I started the company I worked for used a freon based cleaner. It worked great but it was bad for the environment. They went to no clean and the boards certainly did not look as good. The next company used a water soluble flux, better, but now use no clean. Same with current company.

I was looking at the flux on the board and not looking at all the stuff on the board. Looking for failure cause. But the focus is off so I didn't spend much time on it. I never noticed the 328P text on the board.

By "paste" do you really mean "flux"? Solder paste is something completely different. It's microscopic solder balls suspended in flux used for reflow soldering of SMD components.

My container says "Kester soldering paste" on it, not "solder paste". It looks similar to the one here: https://www.worthpoint.com/worthopedia/vintage-kester-soldering-paste-oz-476848944 The word "flux" does not appear on the container. The product inside the container looks the same as the paste or flux in the OP's picture. I left a comment for the OP yesterday to clarify exactly what they are using.

Your paste is probably full of contaminants. You should try this with solder with a flux core. Also try and not go overboard on the flux as you did.

There is flux on the board and that is not going to cause the problems you are seeing. At worst the flux may have an affect on the ability to get a proper lock at 2.5GHz, and that is unlikely.
Clean the board and use magnification to look for damage to the copper foil on the board and inside the plated holes. That will most likely be the problem.
This was from a question regarding no-clean fluxes but the information also applies to the use of regular flux as well.

Today, one of the most common reasons to remove no-clean fluxes is to
  prevent malfunctions in circuits with clock speeds over 1 gigahertz.
  "When you get above 1 gigahertz, the electronscan conducted on the
  outer surface of the conductor. If you have flux on those conductors
  that have those high clock speeds, it can interfere with these fast
  signals."
  http://www.circuitnet.com/experts/73284.html

Most electronics are not cleaned after soldering. The company I work for went to a no clean process 20 years ago.

What 2.5GHz signal are you referring to? The OP is using an Adafruit Feather 328P running at 8MHz / 3.3V: https://learn.adafruit.com/adafruit-feather-328p-atmega328-atmega328p/overview Unfortunately, I don't know anything about "no-clean fluxes". I use Kester Soldering Paste. It has a distinctive color, just like the color of the soldering paste in the OP's pictures. I have a few hundred modules / circuit boards manufactured in China that have a white residue on them. Is this what "no-clean flux" looks like?

My mistake I thought the Feather was a ESP8266 board.  Then excessive flux on the board certainly had nothing to do with the failure. As far as the white residue, yes that is typical of a no clean flux. I have worked for electronic manufactures for the past 35 years. The past 33 designing electronic hardware. When I started the company I worked for used a freon based cleaner. It worked great but it was bad for the environment. They went to no clean and the boards certainly did not look as good. The next company used a water soluble flux, better, but now use no clean. Same with current company.


text:
Esp8266-01 AT Commands returns partially
Im trying to get html response from server via esp01 module
when using the serial monitor in arduino studio everything works fine
here is the serial monitor output
AT+CIPSTART="TCP","aaaa.aaaa",80

CONNECT

OK
AT+CIPSEND=43

OK
>
Recv 43 bytes

SEND OK

+IPD,227:HTTP/1.1 200 OK
Date: Sat, 19 Jan 2019 18:42:58 GMT
Server: Apache
X-Powered-By: PHP/7.2.11
Vary: Accept-Encoding,User-Agent
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

10
Hello from server

0

CLOSED

but when im trying to do the same from the sketch my response is returned partially
AT+CIPSTART="TCP","aaaa.aaaa",80

CONNECT

OK
AT+CIPSEND=43

OK
>
Recv 43 bytes

SEND OK

+IPD,227:HTTP/1.1 200 OK
Date: S

it ends on the first letter of date for some reason
here is my sketch
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX //serial for comunication with esp
void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.setTimeout(5000);//dont know if i need this

  delay(10000);

  //check wifi module
  mySerial.println("AT");
  delay(1000);
  if(mySerial.find("OK"))
  {
    Serial.println("Initializing");
  }else{
    Serial.println("Error initializing");
  }
}

void loop() { // run over and over

  Serial.println("go");
mySerial.println("AT+CIPSTART=\"TCP\",\"aaaa.aaaa\",80");
delay(1000);
    while(mySerial.available()){
    Serial.write(mySerial.read());
     delay(1);
  }
mySerial.println("AT+CIPSEND=43");
delay(1000);
    while(mySerial.available()){
    Serial.write(mySerial.read());
     delay(1);
  }
mySerial.println("GET /load.php HTTP/1.1");
delay(100);
    while(mySerial.available()){
    Serial.write(mySerial.read());
     delay(1);
  }
mySerial.println("Host: aaaa.aaaa");
delay(100);
    while(mySerial.available()){
    Serial.write(mySerial.read());
     delay(1);
  }
mySerial.println("");
delay(2000);

    while(mySerial.available()){
    Serial.write(mySerial.read());
     //delay(100);
  }

delay(5000);

}

what is the reason for this behavior?
how can i fix this?

your while (mySerial.available()) ends at the first gap between bytes. the Serial at 9600 baud is very slow

https://majenko.co.uk/blog/reading-serial-arduino

looks like your sketch is not waiting for the data stream to finish

@Juraj increasing baud did not help

@jsotola how can i add that?

found the solution
i had t wait for serial input without delay function
String sendCommand(String command, const int timeout)
{
  String res = "";
  mySerial.println(command); // send the read character to the wifi
  long int time = millis();
  while( (time+timeout) > millis())
  {
    while(mySerial.available())
    {
      // The esp has data so display its output to the serial window
      char c = mySerial.read(); // read the next character.
      res+=c;
    }
  }
  //Serial.print(response);
  return res;
}

It's OK to accept your own answer if it solves the problem. I think you get 15 rep for that.


text:
Problem “Didn't find PN53x board” Arduino NFC Card Reader
i am using the elechouse PN532 RFID Module with an Wemos D1 mini in the Arduino IDE.
I use the ISO1443a_uid example from the elechouse library. All works fine if i plug the USB Cable into the wemos and the demo runs. But if i press the reset button on the Wemos D1 mini then the Serial brings this output:
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v0fd86a07
~ld
Hello!
Didn't find PN53x board

Sometimes it works fine but mostly comes this error.
Here is the sample code (i am using the I2C Mode):
* When the number after #if set as 1, it will be switch to SPI Mode*/
if 0
 #include <SPI.h>
 #include <PN532_SPI.h>
 #include "PN532.h"

 PN532_SPI pn532spi(SPI, 10);
 PN532 nfc(pn532spi);

* When the number after #elif set as 1, it will be switch to HSU Mode*/
elif 0
 #include <PN532_HSU.h>
 #include <PN532.h>

 PN532_HSU pn532hsu(Serial1);
 PN532 nfc(pn532hsu);

* When the number after #if & #elif set as 0, it will be switch to I2C Mode*/
else
 #include <Wire.h>
 #include <PN532_I2C.h>
 #include <PN532.h>
 #include <NfcAdapter.h>

 PN532_I2C pn532i2c(Wire);
 PN532 nfc(pn532i2c);
endif

oid setup(void) {
 Serial.begin(115200);
 Serial.println("Hello!");
 pinMode(D2,INPUT_PULLUP);
 pinMode(D1,INPUT_PULLUP);
 nfc.begin();

 uint32_t versiondata = nfc.getFirmwareVersion();
 if (! versiondata) {
   Serial.print("Didn't find PN53x board");
   while (1); // halt
 }

 // Got ok data, print it out!
 Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
 Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
 Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);

 // Set the max number of retry attempts to read from a card
 // This prevents us from waiting forever for a card, which is
 // the default behaviour of the PN532.
 nfc.setPassiveActivationRetries(0xFF);

 // configure board to read RFID tags
 nfc.SAMConfig();

 Serial.println("Waiting for an ISO14443A card");

oid loop(void) {
 boolean success;
 uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID
 uint8_t uidLength;                        // Length of the UID (4 or 7 bytes depending on ISO14443A card type)

 // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found
 // 'uid' will be populated with the UID, and uidLength will indicate
 // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
 success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);

 if (success) {
   Serial.println("Found a card!");
   Serial.print("UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
   Serial.print("UID Value: ");
   for (uint8_t i=0; i < uidLength; i++)
   {
     Serial.print(" 0x");Serial.print(uid[i], HEX);
   }
   Serial.println("");
   // Wait 1 second before continuing
   delay(1000);
 }
 else
 {
   // PN532 probably timed out waiting for a card
   Serial.println("Timed out waiting for a card");
 }

What is wrong? why is it not alltimes working after a reset?

I've had one of those elechouse PN532's sitting in a drawer waiting for the right project to come along - wow!! they sure are flakey in I2C mode - little less flakey when I added pullup resistors to SCL and SDA - but 50/50 at best - never had an issue with it in SPI mode

I2C on the PN532, at least using the library you are using, is not very reliable - even with adafruit library and using IRQ and RESET pins, it's still a 50/50 chance that the board is detected. I've tried many things to make mine work and have come to the conclusion that I should either use SPI or HSU mode - these are 100% reliable - and since I'll only ever need to read NFC tags, I think I'll stick to the MFRC522

EDIT:
Try using Elechouse library, it worked better for me.

This might be irrelevant, but I wanted to share.
I had a similar issue, not related to the sketch code.
So make sure:

Connect wires to the NFC module at 90 degrees - there should be angular headers included. Also the wires should be above the antenna - the white strip.
There shouldn't be any wires underneath the NFC module or they should on significant distance.
Soldered wires work better on the NFC module.


text:
Arduino Neopixel affecting IR receiver module
I have tried this on both an Arduino Uno and an Arduino Mega2560. my issue is as follows. Without a 150 LED string of addressable pixels attached, I can pretty consistently capture and read the input from an IR sensor connected at digital pin 2. Once I connect a addressable string of 150 LEDs at digital pin 3, it seems that I am no longer able to reliably read the input from the IR sensor. This seems to be more the case when the pattern I have running on the LED string is heavy, i.e., the majority of the pixels are lit, or the brightness is high. This project also includes a mic connected at analog 5 and aref. Additionally, I am using a 16×2 LCD Display & Keypad Shield connected at digital pins 4-9. Is there any reason that the voltage difference could screw with reading the IR input.

What are you using to power the LEDs? Have you tried enclosing all of the LEDS in something light-proof, like a cardboard box?

turned out I needed to switch to a hardware interrupt for the IR sensor on the more cycle-intensive routines. the short interval didn't allow for sufficient time to poll for incoming IR data.

Interesting! Maybe you could post an answer to your own question? So does taking that hardware interrupt affect the LEDs? The timing for the WS2812/B LEDs is quite tight, so I'd expect some visible effect when IR is being received.


text:
Arduino Record pulseIn
I am currently working on a project which requires me to record IR signals. (I realize there is a library available for doing this but I want to learn how to do this myself).
I tried using a simple sketch which prints out pulseIn() times on the Arduino, but then if I try to record them into an array, the Arduino misses the pulses happening while it is writing the timings to the array.
How can I achieve being able to record these fast pulses to the Arduino's memory without skipping some of the pulses?

I wouldn't use pulseIn myself because it can block for quite a while until it times out. You could use interrupts or other methods. Try reading the code for IRLib and see the techniques they use.

@NickGammon I am unsure of which file in the library records the code.

IRLib.cpp seems to me to be the bulk of it.

You could record the pulses first, and print them later. Storing the pulses in the array should be significantly faster than printing them.

I tried but storing them in an array is also slow. @EdgarBonet

That's really weird. Can you show the code? I'd like to take a look at the generated assembly.


text:
Intel Edison Program Deleted After Power Off
I just bought a new Intel Edison and flashed the newest Yocto 3.0 image. I uploaded an Arduino program from the Arduino ide which just constantly prints out numbers to serial.
After uploading the code, it works. After I unplug it and plug it back in and wait 2 minutes for it to power on, I open the serial connection and the Edison does nothing like I never uploaded anything.
After some research I found it is a problem with the firmware version 2.5 so I tried 2.1. I tried 2.1 and it still doesn't work. Am I doing anything wrong?
I am using the mini-breakout.

I'm having a bunch of problems like this.  I went back to 2.1, and that works, but your sketch can't have any code that uses Serial.  Serial1 is fine, but not Serial, or else the board hangs and your sketch won't autorun when you aren't connected via USB during reset.


text:
Modify Arduino Due's Bootloader to flash when reset
I bought an Arduino Due, and I noticed unlike the other boards, the onboard LED does not flash after reset. I prefer this behavior, so I want to modify the bootloader to do this behavior when it starts. I have burnt bootloaders before, but I never modified one before.
How can I do this?

The Arduino Due bootloader is built-in. If you check the Arduino SAM core there are no bootloader files. There is a firmware file for the ATmega16u2 on the Programming Port. You might be able to modify this to do that (given that there is a LED to flash).
The alternative solution to a modified bootloader is modifing the init() of the Arduino SAM core. Please see https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/cores/arduino/main.cpp#L36 or https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/variants/arduino_due_x/variant.cpp#L372. Blink code as proposed by Majenko could be added there.
Cheers!

In my Arduino Folder, in /hardware/arduino I do not have a sam folder. Do I need to reinstall Arduino?

Nevermind, I found it in the AppData folder. Thanks!

The newer Arduino Boards Manager uses packages. They are typically installed in a "hidden" folder such as AppData, .arduino15, etc. Editing the files there is only a very temporary solution as they may "disappear" in the next update. A long term solution would be to get the code into the Due/SAM core by filing a github issue and a pull-request.

You cannot.
The SAM3X's bootloader is hard-coded into ROM and can never be changed.
Ever.
Yes, I know, it sucks, doesn't it?
However, the bootloader only executes if the flash is empty (bit of an odd choice if you ask me, but there you go) so you could "emulate" the operation by flashing an LED as the first thing in your sketch.
pinMode(13, OUTPUT);
for (int i = 0; i < 5; i++) {
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13, LOW);
    delay(100);
}
pinMode(13, INPUT); // This will "reset" the pin to default.

The blink code could be added to the main.cpp for SAM core. There is actually an initVariant() that is available. That would be the place to put this or the init(). Please see https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/cores/arduino/main.cpp#L36 or https://github.com/arduino/Arduino/blob/master/hardware/arduino/sam/variants/arduino_due_x/variant.cpp#L372


text:
Burn bootloader on custom ATmega 2560 board
I have developed and produced a custom board with a ATmega 2560 on it and a FT232RL for USB communication. I want to burn an Arduino bootloader onto the board without using an external Arduino as ISP. I can't seem to figure out how.
When I just click "burn bootloader" from the arduino software it says:
avrdude: stk500_recv(): programmer not responding
What am I doing wrong and how can I correctly burn the bootloader?

To burn a bootloader you have to use some external device. That can either be another Arduino or a hardware programmer, like an USBASP or something similar.
You can't just magic the bootloader on there through the USB and a dose of wishful thinking. To use the USB you first have to have the bootloader on there.

Okay, thanks for your quick reply. Is there any way I can use other pins than the MOSI and SCK? I don't have those available in the design, the MISO, Reset, GND an VCC are available.

No. You have to program the chip through the pins that you program the chip through. If you didn't provide access to those pins in your design then your design is wrong. You will have to manually solder wires to those pins either direct to the chip or to somewhere that those pins are connected to.


text:
PCINT with my arduino UNO says redefinition of 'void __vector_4()'
So i'm working on a quadcopter controlled by the arduino UNO, and focusing in pin interrupts for the reciever. This is the code for the reciever.
unsigned long timer[4];
byte last_channel[4];
volatile int input[4];

void rx_initialize() {
  PCICR |= (1 << PCIE0);
  PCMSK0 |= (1 << PCINT0);
  PCMSK0 |= (1 << PCINT1);
  PCMSK0 |= (1 << PCINT2);
  PCMSK0 |= (1 << PCINT3);
  Serial.begin(9600);
}

ISR(PCINT1_vect) {

  timer[0] = micros();//Lire la valeur PWM en microsecondes

  //////////////////////////CHANNEL1/////////////////////////////
  if(last_channel[0] == 0 && PINB & B00000001){//vaut digitalRead(HIGH); mais en plus rapide
    last_channel[0] = 1;//le state est HIGH
    timer[1] = timer[0];//Lire combien de temps HIGH
  }
  else if(last_channel[0] == 1 && !(PINB & B00000001)){
    last_channel[0] = 0;//le state est HIGH
    input[0] = timer[0] - timer[1];
  }

  //////////////////////////CHANNEL2/////////////////////////////
  if(last_channel[1] == 0 && PINB & B00000010){//Rising
    last_channel[1] = 1;//le state est HIGH
    timer[2] = timer[0];//Lire combien de temps HIGH
  }
  else if(last_channel[1] == 1 && !(PINB & B00000010)){//Falling
    last_channel[1] = 0;//le state est HIGH
    input[1] = timer[0] - timer[2];
  }

  //////////////////////////CHANNEL3/////////////////////////////
  if(last_channel[2] == 0 && PINB & B00000100){//Rising
    last_channel[2] = 1;//le state est HIGH
    timer[3] = timer[0];
  }
  else if(last_channel[2] == 1 && !(PINB & B00000100)){//Falling
    last_channel[2] = 0;//le state est HIGH
    input[2] = timer[0] - timer[3];
  }

  //////////////////////////CHANNEL4/////////////////////////////
  if(last_channel[3] == 0 && PINB & B00001000){//Rising
    last_channel[3] = 1;//le state est HIGH
    timer[4] = timer[0];
  }
  else if(last_channel[3] == 1 && !(PINB & B00001000)){//Falling
    last_channel[3] = 0;//le state est HIGH
    input[3] = timer[0] - timer[4];
  }
}

I'm using various files for every other part of the quadcopter such as PID controlling and IMU Reading.
But avrdude tells me that I did a redefinition of 'void __vector_4()'.
Itried to look into PinChangeInt.h in the Arduino library folder but still no solution to the problem.
Thank you for your help!

Did you look into using it?

Are you using SoftwareSerial perchance?

Hello? Are you going to answer my query?

Sorry i was using a library for PinChangeInterrupt and all vectors were declared in it. So i was declaring it twice and it was giving me errors.

I wasn't using softwareSerial BTW.

__vector_4() is just another name for PCINT1_vect(). The error
message simply means that you have defined that function twice. One
definition is explicit in the code you are showing to us. I cannot see
the other definition: obviously you are not showing all of your
code. Most likely that other definition lies inside some library you are
using in your program.
Since you cannot define an ISR twice, you will have to use another PCINT
which is not already in use. Or you could modify the library and try to
merge it's PCINT1_vect() with yours.
BTW, the error message does not come from avrdude, it comes from the
linker.

Thanks for everything guys.  I was using a library that defined these vectors.

The library I used defined the vectors. I just needed to comment them inside the library it worked fine. Thanks for everything!

just commented the lines and VOILA.

You should use the ISR(PCINT0_vect) instead of the ISR(PCINT1_vect).
Or if you want to use PCINT1:
PCICR |= (1 << PCIE1);
PCMSK1 |= (1 << PCINT8);
PCMSK1 |= (1 << PCINT9);
PCMSK1 |= (1 << PCINT10);
PCMSK1 |= (1 << PCINT11);

But them you have to change every PINB to PINC too as it uses a different PORT

I tried using your solution with PCINT0 and all corresponding pins(8, 9, 10, 11) but I still get the same error:

redefinition of 'void __vector_3()'

You should only use PCINT0 it the pins you already had and PCINT1 with 8 to 11. Changing both at the same time will give new errors

I mean i used this:

void rx_initialize() {
PCICR |= (1 << PCIE0);
PCMSK0 |= (1 << PCINT0);
PCMSK0 |= (1 << PCINT1);
PCMSK0 |= (1 << PCINT2);
PCMSK0 |= (1 << PCINT3);
Serial.begin(9600);
}
ISR(PCINT0_vect) {


text:
Arduino 1.8.9 Won't Load
I recently upgraded my windows10 from version 1803 to 1903. I had to do a clean install to accomplish it though, but my question is, I downloaded Adriano IDE 1.8.9 and installed it but it won't launch. It starts, then the window closes and that's it. Does anybody have any thoughts on what's going on? Or better yet what's not going on?
Thanks, Dennis

Where did you download the IDE from?

Does 1.8.10 work? https://www.arduino.cc/en/Main/Software

Do you have a Java runtime installed? If so, what version?

I downloaded Arduino IDE 1.8.10 directly from Arduino.cc. I thought of the Java issue and downloaded the latest version for Windows10, 8.221(build 1.8.0_221-b11), and it's running. Oh, and I tried to load and run Arduino IDE version 1.8.9 that I'm running on my other machine, and it didn't run either. Seems like there is something in this new OS that Microsoft is not telling us about.


text:
Change max and min read value of potentiometer
I'd like to know if there is a function or some way to define min and max value to potentiometer, for example: I'm using a mechanical part that only tour the potentiometer a little bit, what means the potentiometer doesn't start in the beginning and doesn't finish in the end. So, how can I make this space the potentiometer tour means 0 to 255 the start to end, respectively?

You cannot declare that the min and max values of a potentiometer are x and y. What you can do is map() the values of the potentiometer to your own desired scale.
To do this, you'll have to get the following values:

Minimum value of the potentiometer, pMin
Maximum value of the potentiometer, pMax

But these values aren't what you want. For example, what you want is pmin to be 0 and pMax to be 100. So, you'll have to scale pMin and pMax to those values.
For this, you use the map() function. What map() does is changing the value in a given scale, to that of another scale. Let's get some example code:
int pMin = 14;  //the lowest value that comes out of the potentiometer
int pMax = 948; //the highest value that comes out of the potentiometer.

int x = 0;  //we will use this value to store the readings of the potentiometer

void setup(){
  Serial.begin(9600); //Serial monitor can be used to check the values
}

void loop(){

  x = analogRead(A0); //connect the potentiometer to the A0 pin of the Arduino

  Serial.print(x);  //prints the original reading

  x = map(x, pMin, pMax, 0, 100) //take the value of x, compared it to the scale of the potentiometer pMin to pMax, and translate that value to the scale of 0 to 100

  Serial.print("\t"); //a tab to make the reading more easy
  Serial.println(x);  //post mapped value, println is a linebreak as well
  delay(100); //so we don't post to much in the serial and you can read data better.
}

With this example you can clearly see how your potentiometer behaves and how you can use the 'weird' values from its readings in a useful way for your projects.

You can even make it auto-calibrating. In the loop, if (x > pMax) { pmax = x ), and vice versa for pMin. But then the user would have to twiddle the pot every time the device starts, unless you save the min and max to eeprom.

If the values from the pot are 0 - 1023 you can divide the number by 4 which would give you a closer range to what you need. The map() function can be used instead.

Either use a reference voltage closer to the maximum voltage the potentiometer is capable of, or use map() to map the existing limited range to a larger range. Note that using map() will not improve precision.


text:
USB connector between Arduino and a lever (switch)
I am not sure an Arduino forum is the right place to ask this question, but since I'm using Arduino here I thought it would be a good starting point. I am trying to connect a lever (you can think of it as a switch, when it's pressed it's ON, and otherwise it's OFF) to an Arduino via a USB connector. My setup worked perfectly fine when I connected the lever directly to the Arduino, but via the USB it doesn't work. Since I already built and invested in USB connectors I would like to solve this issue, or at least understand what I am doing wrong in here.
I've attached a photo to demonstrate the wiring. Note that it works if I bypass this USB connection. I'm trying to understand why this doesn't work via a USB.

to clarify, you're using a USB connector, but not for a USB connection? perfectly valid thing to do, just check if the female to female doesn't "cross" the grn/yellow connections

As there is not really a legitimate role for USB female to female cables, any you find should be considered highly suspect.  It is quite possible they do not connect all of the pins through, or do not connect them in the way you believe they should be connected.  And generally speaking, using USB connectors for a different purpose is a bad idea - it is just asking for confusion.

Thank you both. Yes, I'm using a USB connector, but not for a USB connection. I guess the problem is indeed the female to female connector. I agree this was a bad idea, but I'm already invested in this solution as I made 16 Arduino boards following this schematic. I can re-wire everything and try different connectors, but it would be great if I could make this work without spending more money on different connectors.

@ChrisStratton I have a female to female USB A cable here. It has a perfectly legitimate role. It came with my oscilloscope and is used for connecting the USB A socket on the front to a USB A socket on a PC. The oscope then switches its OTG to Device mode and the PC sees it.

That is not a legitimate use in the eyes of the USB spec, hence the cable was not supposed to exist.  I've had needs like that too, and sourcing a solution can be hard - when you are shopping for something that isn't supposed to exist, you run into vendors that sell creative fiction.  A working cable certainly can be made, but it's not necessarily what you will get when you buy.

@ChrisStratton What's male and what's female on USB? They're very much hermaphroditic. They're the Bangkok Chick-Boy of connectors.

I'd suggest using a multimeter to figure out what's connected to what after hooking up the complete wiring scheme; there aren't that many options and you should be able to figure out what's connected to what soon enough. On a more philosophical note, it's only a bad idea if the alternatives weren't worse.

I support this answer. If you use a multimeter you can test which pins of the USB connection are linked. I've used USB cables in the past for several installations as well, i.e. for sound or to control NeoPixels. It works quite good, but you have to make sure all the things are wired properly.


text:
Exporting ADC data to excel
Do I need third party s/w to export to a spreadsheet? I have built a heat flux sensor meter and wish to log my data.

You need some way of getting the data from the Arduino to the PC. There's a number of ways of doing it depending on what resources you have available.

Through serial as CSV

This entails printing the data to the serial port in CSV format then using some software on the PC to capture that and save it to a file. That could be as simple as a good terminal emulator that provides "capture to file" or similar, or you could write your own program in your favourite programming language.  This method is essentially free.

To an SD card

Writing the data as a CSV file onto an SD card directly attached to the Arduino can be quite convenient. It means you can then just take the SD card with the data on it and slip it into your computer to import the data as you would with any other file.  It needs an SD card shield or breakout board attaching to the Arduino

Through the network

If your Arduino has a network connection of some form (WiFi shield, Ethernet shield, etc) you could POST the data to a web page running on your PC and store it in a CSV file for later importing. Probably the most expensive option but it does mean you can do things with the data "live" as it comes in.

Just note that Excel sometimes expect a ; instead of a , inside a CSV file (depending on the locale settings of Windows)

If only they kept hyper terminal in WIN 7 :(

@eggroll Why? HT was shite.

True, but it offered a quick and dirty platform for what I needed. My S/W guy is writing the GUI, but I wanted to do some preliminary work and HT is easy for us H/W guys, lol.

Use tabs to separate columns of data, and newlines between each row.
Then you can copy the serial output, and paste it into Excel.


text:
Please explain this adafruit image for connecting a DS1307 RTC
https://learn.adafruit.com/assets/3813
I understand that analog 4 and 5 are SDA/SLC, isn't the picture also showing 5v and GND being plugged into two analog pins? Does that work?
I have it wired up to the actual 5v and GND, but it would be convieniet to be able to stack the RTC like they show in the picture

You can use ADC pins as general DIO too. In this case 2 PORTA pins set as output, one with HIGH and other LOW outputs to be used as source and sink. Sure pin currents must be within the allowed specs. DS1307 shall consume very low current (designed to be operating years by battery).

@Flanker You just gave an answer. You shouldn't put that in a comment.

It's written in the tutorial

If you set analog pin 3 (digital 17) to an OUTPUT and HIGH and analog pin 2 (digital 16) to an OUTPUT and LOW you can power the RTC directly from the pins!

Wow I don't know how I missed that. Thanks!


text:
Is possible to concatenate integers?
It's a basic one: I have two values from two different analogRead pins:
int val1;
int val2;

For example, val1 = 10 and val2 = 10. How could I put these two values into a variable val3 = val1 + val2 that will give the answer 1010, instead 20 ?

val = (val1*100) + (val2%100)

val = (val1 << 8) + (val2 & 0xff)

float val = val1 + (val2 / 100.0)

It is far from clear what you think you are attempting to achieve. I suspect you may be suffering from an XY problem where you think you have come up with a solution to a problem, and are asking for help with the solution, when you don't actually really understand what the problem is, and so your solution won't actually do what you expect it to do.

For instance, have you considered what will happen if val1 is 3, or val2 is 400? Concatenating integers makes little to no sense, and I suspect you actually want to do something else entirely.

Actually I am trying to reduce the times I need to transmit data over radio frequency. My question could be poste in other form: How could I concatenate any kind of variable? What I need to do to have
char  val1 = "abc";
char val 2 = "def";
char val3 = val1 + val2
and could I have val3 = "abcdef"  ?

I really like the explanation of a XY problem!!! Maybe this question could be suitable for.
But in matter of fact, the answer to the question "is possible to concatenate integers?" could be simply "no, it´s not".

Integers aren't things you meaningfully concatenate. You could turn them into strings, and then use strcat to concatenate them.

If you are reading from the analog pins then the values are 10 bits (not 8 as suggested above).  Are you looking at concatenating 2 10 bit numbers or 2 16 bit numbers or are you using a zero or duo in which case they could be 12 bit numbers.
In any case:
const int BITMASK = 0x3FF;  // 10 bits = 0x3FF, 12 = 0xFFF, 16 = 0xFFFF
const int BITWIDTH = 10;
long result = ((value1 & BITMASK) << BITWIDTH) | (value2 & BITMASK);

I suspect it won't give you the answer you want, but...

Sound promising... I will take a look

It sounds to me, from your comments, that what you want to do is turn this:
myRadio.transmit(val1);
myRadio.transmit(val2);

into something more like this:
myVal = join(val1, val2);
myRadio.transmit(myVal);

That's all pseudocode of course, and those functions are in themselves nonsense, but it serves to illustrate.
So you want to turn two values into one single block of data for sending thus reducing the overall transmission overhead of the packet (one large packet instead of two smaller packets).
What you are actually looking for is called a struct and looks something like this:
struct MyData {
    int val1;
    int val2;
};

That creates a new variable type which contains two sub-variables in it. You then use it like any other variable:
struct MyData data;

You can then get at the values inside it with:
data.val1 = analogRead(A1);
data.val2 = analogRead(A2);

And the whole thing can be transmitted in one block with whatever functions your RF library provides:
myRadio.transmit(&data, sizeof(struct MyData));

Receiving at the other end is just the same - as long as the receiving end has the same structure. Receive into a MyData structure variable and you can get at the individual sub-variables:
struct MyData data;
myRadio.receive(&data, sizeof(struct MyData));
Serial.print(data.val1);
Serial.print(",");
Serial.println(data.val2);

Of course, you need to read up on whatever library it is you're using to do your transmitting and receiving to find the actual correct functions to call to transmit and receive a block of data like that...

If you know in advance how many variables' values you want to transmit:
char output[100+1];
....
snprintf(output, sizeof(buffer), "%d,%d,$d\n", val, val2, val3);

If not and you need to build the string "as you go":
char output[100+1] = "";
char oneVal[12+1];
...
snprintf(oneVal, sizeof(buf), "%d,", value);
strcat(output, oneVal);

// more of the above, possibly in a loop.
...
strcat(output, "\n");      // if you need a newline at the end

You want to send a string of data that represents the data from a number of sensors. For example let's say you have 2 10 bit analog readings and 4 Boolean readings, high or low from the digital pins.  You can compress this into 24 bits of data, or 3 bytes.
If your transmission library supports binary writing and reading then you can send it as 3 unsigned chars.
If your transmission library doesn't support binary then you can either base64 encode it as 4 bytes. (The numbers are converted into printable characters that represent their value).  Or a more light weight solution would be to write each byte as two hexadecimal digits.
You pack the data into three bytes by using bit masking and shifting (as per my other answer).
int sensor1data = 512;
int sensor2data = 64;
bool digital1 = true;
bool digital2 = false;
bool digital3 = false;
bool digital4 = true;

unsigned char data[3]{ 0, 0, 0 };

// Take the top 8 bits of the 10 bit data on sensor1data
// 0x300 takes the 2 lowest bits of the upper byte
// 0x0FC takes the 6 highest bits of the lower byte.
// Shift the result 2 places right so the what was bit 2
// of the upper byte becomes the most significant bit (MSb)
// in the result byte.
data[0] = (sensor1data & 0x3FC) >> 2;

// Take the 2 lowest bits of the lower byte (0x03)
// Shift the 6  places left to make them the MSb of the
// result byte.
data[1] = ((sensor1data & 0x3) << 6);
// Take the 6 MSbs of the sensor2data and left shift them
// so that they become the LSbs of the result byte.
// The result is ORed onto what is already in the result
// to retain the previous instruction.
data[1] |= ((sensor2data & 0x3F0) >> 4);

// Take the 4 LSbs of sensor2data and shift them right
// for places to ocupy the 4 MSbs of the result.
data[2] = ((sensor2data & 0xF) << 4);
// OR each of the flags into the result, shifting by
// a different amount each time.
data[2] |= (digital1 ? 1 : 0) << 3; // I explicitly convert the bool to an int
data[2] |= (digital2 ? 1 : 0) << 2; // because some older compilers don't always
data[2] |= (digital3 ? 1 : 0) << 1; // use 1 for true.
data[2] |= (digital4 ? 1 : 0);

This is a very elegant solution!

This is not even remotely related to Arduino but mathematics.
As Mikael Patel pointed out this can be done fairly easy.
You might tell us your intent.
If you are seeking for a way to pack values tightly you may consider Integer Sequence Enconding.
But without more detailed information this will be just a guess.

The intent is stated in the question as handling numbers read from two analog pins.

Well that is what he tells us, he wants to achieve. But I'm not sure he really knows what he wants to do with that. Why does it make sense to "concatenate" two integer values in decimal? Why not hex? What is the goal with that? What are the sources of the analog reads?

Actually, it can be done arithmetically with no problem, but I used 10 + 10 = 1010 just for example.
I am open to suggestions if I need to convert to HEX or BIN. I thought it was a question easy to be solved and it was just me that was missing something.

I am using a MEGA2560 to read several sensors (termistors, encoders, RTC, etc) and transmits this data over a RF433 module to an UNO. The module only send pointers pointed to strings. What I am doing is converting the data from sensors into string and sending one by one through RF.
I have a Python script reading the data on the other side, if I could concatenate all the data from the sensors to send all at once will be much easy for me handle this data in Python.

@DiegoDyan - based on what you have just said I think you need to look in a different direction.  Please see my 2nd answer.


text:
Frequency generator
Can arduino generate the frequency with the resolution of 2 decimal places?
i.e. 100.12 Hz, 98.23Hz, 1.92Hz...
recently I need to generate a frequency to allow a stepper motor to move accordingly. But to ensure the stepper motor to functions normally, frequency must be generated , and it must be of 2 decimal places.
Can Arduino do that? Or is there any specific product that may generate frequency resolution as such?

There are better choices (processors with faster clocks, programmable oscillators, FPGAs) but it may be possible via use of interpolation or microstepping to get close enough to the desired behavior to work in your application.  This will not be a simple project, so the usual reasons for picking an Arduiono may not apply, especially as some of the other solutions will more easily get you close to this goal.

Do you need accuracy in addition to resolution? The answers so far show you can probably get the resolution you want, but if you also want accuracy, you will have to choose an Arduino clocked off a quartz (e.g. a Leonardo) rather than a crystal resonator (like the Uno).

What frequency? There is a big difference between 123456.22 and 1.22 in terms of significant digits, although they both have 2 decimal places.

@EdgarBonet - good point. I am 2.5678432 meters tall. That is a very precise measurement. It is also inaccurate. :)

thank you Chris, Edgar & Nick. Awesome respond.  Edgar: yes I need accuracy as well. Nick: there are several different frequencies I need to set which all of them need to be set at 2 dp. Wow, with that height u can be an NBA player hehe.

The other answers about the way you can configure the timers are very good, but Edgar Bonet's comment goes to the heart of the matter. Do you need accuracy?
Your example of 98.23Hz suggests that you want 98.23Hz and not 98.22Hz or 98.24Hz. That means therefore that you require an accuracy of around 1 in 10000 (0.01%).

Can arduino generate the frequency ...

You haven't said which Arduino, but assuming one of the basic models, like the Uno, they come with a resonator which will have an accuracy of around 1%.
If the system clock is only good for 1% accuracy there isn't much point worrying about trying to get a frequency within 0.01%.

thanks and yeah I forgot to mntion the type. Other than the Uno, which Arduino might give the precise and accurate setting for 2 dp?

The standard Arduino Uno is clocked at a nominal 16MHz, and has three timers: Timer0, 1 and 2. Timer1 uses a 16 bit counter (the others are 8 bit), and can be prescaled by 1, 8, 64, 256 and 1024. That lets you do very precise timings (assuming an accurate clock!), simply by choosing different prescaler values and the relevant values.
Using your example rates, and assuming that you want a square wave (hence the "Halved" column), here are the calculations:
 Hertz Prescaler  Calculated      Halved  Actual Hz
100.12         8  19976.02876548   9,988  100.120144173...
 98.23         8  20360.3787      10,180   98.231827112...
  1.92       256  32552.08333333  16,276    1.9200049...

Note that to do this, you need to program the Timer yourself - the standard Arduino library sets Timer1 to a default setting, which won't do what you want.

thanks for your suggestion. Where can I refer on how to program the Timer myself?

The definitive work is the Atmel datasheet: http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf . You'll want to read chapters 16 and 17.

I happened to do a similar analysis for Timer 1 on 328 / 32U4 clocked at 16MHz the other day and produced this plot:

This shows the frequency resolution as a proportion of frequency in red assuming optimal prescaling (the jumps are where prescale changes). The blue markers are realized frequency errors at frequencies drawn at the E12 series in magnitudes from 0 to 5. Unsurprisinly these are half or better than the resolution.
As a conclusion, you get a relative error of around 5e-5 for frequencies up to about 1kHz. After that you loose an order of magnitude per order of magnitude (which of course makes perfect sense).


text:
How to upload arduino code using xbee module ( pro s2c)?
I have three arduino ATMega2560 boards, all have xbee pro s2c attached to them. Now i want to update the code i had previously written on the arduino board but without connecting it to the computer. So basically I want to upload a code to arduino board via the xbee module I have attached to it, code is transmitted to this xbee from another xbee. Anyone with any type of ideas please share....

You could do it like I update the application in Mega in ArduinoOTA library https://github.com/jandrassy/ArduinoOTA/blob/master/src/InternalStorageAVR.cpp it requires to changed the bootloader to Optiboot with copy_flash_pages function https://github.com/jandrassy/ArduinoOTA#atmega-support

updated application binary is received to upper half of the flash memory with Optiboot's do_spm function and after then copied to the beginning of the flash with copy_flash_pages function of Optiboot. copy_flash_pages then resets the MCU.

thanks a lot @Juraj i will try that and let you know if this was helpful


text:
WS2812 Matrix colour problem. Power?
I have 8 8x8 WS2812 Matrix LED boards connected together to make 2 16x16 matrices. I have them connected with Dupont wires.
I also power the 2 16x16 with Dupont wires that are connected to a 5v 60Amp PSU (More Leds will be added later). The PSU power  should easily support the LED power requirements however, if I set the brightness anything over 30...the first matrices start to get reddish at the end. They start white but as the end they are orange/red.  If I set the brightness to 20-25 they are white. So there must be something with the power but I have 60amps...Can it be that the Dupont cables are the bottleneck? The cables don't get hot...so I guess they are ok?
Any help is highly appreciated.
Thanks
V.A

Measure the voltage before and after the jumper wires.

If I have brightness 20, i get 4.6V at the last matrix...if I increase it to the max of 255, I get 2.6v at the last matrix...So you are right. Fore some reason a have a voltage drop although the matrices are designed to be interconnectable...with Vin and Vout on the board. Can you can think of any solution to this?

Some of the cheap jumpers I have are so small, they maybe have 7 tiny strands of copper. The voltage drop over them is significant enough that they aren't usable for transmitting power, only signal/data level.

I soldered some cables from an ATX power supply but have the same results...It only does it when using white as there are all three colours at max brightness. I am going to try some cable that is used in wall sockets...let's see.

Connect the power/gnd to both ends of the matrix  to relieve the current flow across the individual boards power traces.  May have to connect in the middle as well.

I tried that. It improves so that I can use 60 Brightness but anything over that causes issues. I will increase wire gauge and see what happens...

Use at least AWG20 and power each possible spot on the matrices (in and out). All the energy not reaching the LEDs is fried in the DuPont wires. Use Ohms law.