The focus of this module is communication between the Arduino and Java, which will require that we think carefully about how the data are represented. We will send data from the PC to the Arduino. With this functionality, we’ll be able to control our circuits from the PC side - a very useful tool.
We will be using the Java Simple Serial Connector (jSSC) library for serial communications. A local copy of the JavaDoc for the library can be found here.
Read Chapter 12 in the course text.
Video | Description |
---|---|
Text Representation | You saw this video earlier in the semester, but we’ll be using more text in this module, so it would be a good idea to review these concepts. NOTE: This video indicates that ‘A’ is represented as 0x40 and ‘a’ is represented as 0x60 in ASCII. They are actually 0x41 and 0x61, respectively. |
Hexadecimal | We first introduced you to hexadecimal in week 1, but we’ll be relying on it more and more in the next few modules, so be sure you understand this concept. |
The following videos are very helpful in understanding how to read user input from the console in Java.
Video | Description |
---|---|
Java Input Streams | In this video we’ll discuss how to use input streams to grab information from the user. |
Validating Input | The data you receive from your users may not be what you were expecting. This video will give some tips about what to do when that happens. |
This guide gives some help on how to use the serial communication libraries in Java.
Generated at 2024-10-03 20:24:43 +0000.
Page written by Doug Shook.