EasyManuals Logo

Arduino MEGA 2560 Application Note

Arduino MEGA 2560
6 pages
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #6 background imageLoading...
Page #6 background image
©16March2017CO2Meter,Inc.AllRightsReserved 6
int timeout=0; //set a timeoute counter
while(T66_Serial.available() < 5 ) //Wait to get a 7 byte response
{
timeout++;
if(timeout > 10) //if it takes to long there was probably an error
Serial.print("Timeout");
{
while(T66_Serial.available()) //flush whatever we have
T66_Serial.read();
break; //exit and try again
}
delay(50);
}
for (int i=0; i < 5; i++) response[i] = T66_Serial.read();
}
unsigned long getValue(byte packet[])
{
int high = packet[3]; //high byte for value is 4th byte in packet in the packet
int low = packet[4]; //low byte for value is 5th byte in the packet
unsigned long val = high*256 + low; //Combine high byte and low byte with this
formula to get value
return val;
}

Other manuals for Arduino MEGA 2560

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino MEGA 2560 and is the answer not in the manual?

Arduino MEGA 2560 Specifications

General IconGeneral
MicrocontrollerATmega2560
Operating Voltage5V
Input Voltage (recommended)7-12V
Input Voltage (limit)6-20V
Digital I/O Pins54
PWM Channels15
Analog Input Pins16
DC Current per I/O Pin20 mA
DC Current for 3.3V Pin50 mA
Flash Memory256 KB of which 8 KB used by bootloader
SRAM8 KB
EEPROM4 KB
Clock Speed16 MHz
LED_BUILTIN13
Length101.52 mm
Width53.3 mm
Weight37 g

Related product manuals