add arduino-0018-linux (32 bit)
This commit is contained in:
		
							parent
							
								
									7fa52a235a
								
							
						
					
					
						commit
						297de2a227
					
				
					 425 changed files with 64818 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
/*
 | 
			
		||||
  Mega multple serial test
 | 
			
		||||
 
 | 
			
		||||
 Receives from the main serial port, sends to the others. 
 | 
			
		||||
 Receives from serial port 1, sends to the main serial (Serial 0).
 | 
			
		||||
 
 | 
			
		||||
 This example works only on the Arduino Mega
 | 
			
		||||
 
 | 
			
		||||
 The circuit: 
 | 
			
		||||
 * Any serial device attached to Serial port 1
 | 
			
		||||
 * Serial monitor open on Serial port 0:
 | 
			
		||||
 
 | 
			
		||||
 created 30 Dec. 2008
 | 
			
		||||
 by Tom Igoe
 | 
			
		||||
 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void setup() {
 | 
			
		||||
  // initialize both serial ports:
 | 
			
		||||
  Serial.begin(9600);
 | 
			
		||||
  Serial1.begin(9600);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void loop() {
 | 
			
		||||
  // read from port 1, send to port 0:
 | 
			
		||||
  if (Serial1.available()) {
 | 
			
		||||
    int inByte = Serial1.read();
 | 
			
		||||
    Serial.print(inByte, BYTE); 
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in a new issue