Last active
March 1, 2017 00:03
-
-
Save murilopontes/8845413 to your computer and use it in GitHub Desktop.
Stellaris / Tiva C - Testing all USARTs using Energia IDE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please test Rx also. :)