Skip to content

Instantly share code, notes, and snippets.

@murilopontes
Last active March 1, 2017 00:03
Show Gist options
  • Save murilopontes/8845413 to your computer and use it in GitHub Desktop.
Save murilopontes/8845413 to your computer and use it in GitHub Desktop.
Stellaris / Tiva C - Testing all USARTs using Energia IDE
// Stellaris / Tiva C - Testing all USARTs
void setup()
{
pinMode(40,1);
Serial.begin(115200);
Serial1.begin(115200);
Serial1.setPins(UART1_PORTB); //trick to active USART1 without overlap USART4
Serial2.begin(115200);
Serial3.begin(115200);
Serial4.begin(115200);
Serial5.begin(115200);
Serial6.begin(115200);
Serial7.begin(115200);
}
int i=0;
void loop()
{
Serial.print(i); Serial.println(" Hello world! 0 ");
Serial1.print(i); Serial1.println(" Hello world! 1");
Serial2.print(i); Serial2.println(" Hello world! 2");
Serial3.print(i); Serial3.println(" Hello world! 3");
Serial4.print(i); Serial4.println(" Hello world! 4");
Serial5.print(i); Serial5.println(" Hello world! 5");
Serial6.print(i); Serial6.println(" Hello world! 6");
Serial7.print(i); Serial7.println(" Hello world! 7");
i++;
if(i%2){ analogWrite(40,1); }
else { analogWrite(40,0); }
delay(100);
}
@rahuldeo2047
Copy link

Please test Rx also. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment