ArduinoMega2560_SPI 1.0
Cargando...
Buscando...
Nada coincide
app.ino
Ir a la documentación de este archivo.
1// Example program for avr-debugger library.
2// IMPORTANT:
3// These instructions are for Visual Studio Code. For other use cases see the readme.txt.
4// To start debugging:
5// - Add "output": ".\\build" to file arduino.json (in .vscode folder)
6// - Change the COM port number to your port number in launch.json, see "miDebuggerServerAddress": "\\\\.\\COM7"
7// - Change the path to point to avr-gdb.exe in your Arduino installation, see launch.json, "miDebuggerPath":
8//
9// - Place breakpoint to loop, e.g. on digitalWrite - by clicking into the left margin of the file - red dot should appear
10// - Upload the program to your Arduino
11// - Switch to debug view
12// - Click Start debugging button (Play icon) in the top
13//
14
15#include <app_api.h>
16#include <avr8-stub.h>
17
18int globalCounter = 0;
19
20void setup()
21{
22 debug_init(); // initialize the debugger
23
24 pinMode(13, OUTPUT);
25}
26
27void loop()
28{
29 int localCounter = 0;
30 localCounter++;
31
32 digitalWrite(13, HIGH);
33 delay(100);
34 digitalWrite(13, LOW);
35 delay(200);
36
37 globalCounter++;
38 localCounter++;
39
40}