44 comments posted · 144 followers · following 0
The procedure on page 155 sets up a new project that uses the code on page 157. This project does not print anything out of the serial/USB port to TeraTerm. It controls the connected LEDs shown on page 153 and 154.
Make sure that you selected the correct tool as shown in Figure 8.15 on page 157. A test can be done to check whether the tool (Atmel-ICE) is working and can "see" the hardware it is connected to as follows: In Atmel Studio, click the Device Programming icon on the top toolbar, or select Tools --> Device Programming, or use the keyboard shortcut Ctrl+Shift+P. This opens the Device Programming dialog box. In the Device Programming dialog box, make sure that the correct Tool (Atmel-ICE), Device (ATmega328P for Arduino UNO) and Interface (ISP) are selected at the top of the dialog box. Click the Apply button. Click the Read button under Device signature. If the Atmel-ICE is working and connected correctly and the Arduino Uno is powered up, then the Device signature and Target Voltage fields are filled in with a valid signature and voltage. This shows that the Atmel-ICE is working and can "see" the target hardware.
Other than that, the only other thing I can suggest is to unplug the Atmel-ICE and reboot the computer. After that, try programming the board again. If that fails, then create the project again from scratch.
Hope that helps,
If what you mean by the terminal is a program such as Tera Term connected to the Arduino USB/serial port, then you can use control codes, such as are mentioned on page 100 and 101 to manipulate the cursor and terminal screen. These are usually referred to as ANSI/VT100 control codes. What you need to do is write your own functions to use these codes. For example, you can write a function called gotoxy(int x, int y) that is passed the x and y coordinates to move the cursor to, then use the code \x1B[x;yH in the function to move the cursor to the specified x, y position. Find a clear screen cls() function examples here: https://rosettacode.org/wiki/Terminal_control/Cle...
Some basic control codes are found here: https://student.cs.uwaterloo.ca/~cs452/terminal.h...
Just note that the escape character is written as an octal number in this reference, for example 33[2J whereas the book uses hexadecimal numbers for the escape character, for example \x1B[2J Other references may write the escape character as <ESC>
Bear in mind that not all serial terminals emulate a VT100 terminal, so control codes do not work with all terminal programs.
I hope that helps.
The Digistump Digix board that you mentioned is something completely different. It is a 32-bit ARM board. The Digispark board is an 8-bit AVR board.
I followed the tutorial again using a different computer with a fresh install of Windows. Digispark (Default - 16.5MHz) appears on the Tools menu as per the tutorial. The IDE prompts for the board to be plugged in. The only problem I had on this computer is that Windows would not recognize the driver. This can occur on some computers because the Digispark board simulates USB. Testing it on another computer still works.
What you described with Arduino sounds like you set it up as a USB device. I don't know if the Digistump can operate as a USB device.