Main Page: Difference between revisions

From Embedded Workshop
Jump to navigation Jump to search
Line 11: Line 11:


== ASCIITable ==
== ASCIITable ==
ASCIITable is rather boring, but provides an example of how to use the Arduino's serial port to send messages to the console window (or to any serial terminal program.)  Since the Arduino platform doesn't provide a debugger, it's often required to add serial print statements into your program to see how the program is progressing, and to see what the values of certain variables might be.  ASCIITable is available in the Arduio menu under <span style="color:red">File->Examples->04.Communication->ASCIITable</span>.<br>
ASCIITable is rather boring, but provides an example of how to use the Arduino's serial port to send messages to the console window (or to any serial terminal program.)  Since the Arduino platform doesn't provide a debugger, it's often required to add serial print statements into your program to see how the program is progressing, and to see what the values of certain variables might be.  ASCIITable is available in the Arduio menu under {{Highlight |File->Examples->04.Communication->ASCIITable}}.<br>
<strong>Key APIs (functions)</strong><br>
<strong>Key APIs (functions)</strong><br>
* Serial.begin(9600);  // Use 9600 for the serial port data rate (9600 and 115200 are very common values)  Be sure to tell your Arduio console window the data rate (baud) you selected here.
* Serial.begin(9600);  // Use 9600 for the serial port data rate (9600 and 115200 are very common values)  Be sure to tell your Arduio console window the data rate (baud) you selected here.

Revision as of 14:28, 31 May 2018

Bukkit Minecraft Server

Embedded Projects

Arduio Projects

Blinky

Blinky is often the first program used to begin learning the Arduio environment and to test the development board to verify a program can be written, compiled, downloaded, and executed. Blinky is available in the Arduio menu under {{#if:|{{#ifexpr:({{#time:U|{{{3}}}}} - {{#time:U|now}}) > 0|File->Examples->01.Basics->Blink|File->Examples->01.Basics->Blink}}|File->Examples->01.Basics->Blink}}.
Key APIs (functions)

  • pinMode(LED_BUILTIN, OUTPUT);
  • digitalWrite(LED_BUILTIN, HIGH);
  • delay(1000);

ASCIITable

ASCIITable is rather boring, but provides an example of how to use the Arduino's serial port to send messages to the console window (or to any serial terminal program.) Since the Arduino platform doesn't provide a debugger, it's often required to add serial print statements into your program to see how the program is progressing, and to see what the values of certain variables might be. ASCIITable is available in the Arduio menu under {{#if:|{{#ifexpr:({{#time:U|{{{3}}}}} - {{#time:U|now}}) > 0|File->Examples->04.Communication->ASCIITable|File->Examples->04.Communication->ASCIITable}}|File->Examples->04.Communication->ASCIITable}}.
Key APIs (functions)

  • Serial.begin(9600); // Use 9600 for the serial port data rate (9600 and 115200 are very common values) Be sure to tell your Arduio console window the data rate (baud) you selected here.
  • Serial.print("Fred"); // Display the text, "Fred"
  • Serial.println("Some text to display"); // Display the text, "Some text to display", and begin a new line below it
  • Serial.write(thisByte); // Display the ASCII representation of the byte, "thisByte"




Consult the User's Guide for information on using the wiki software.

Getting started