commit 2495bd93f27e7ec8fd7cc6342cf8eebe28717f41 Author: Rafa Date: Fri May 9 20:06:09 2025 +0100 Init project diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3df2452 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +build/ \ No newline at end of file diff --git a/.vscode/run b/.vscode/run new file mode 100755 index 0000000..616a334 --- /dev/null +++ b/.vscode/run @@ -0,0 +1,11 @@ +#!/bin/bash + +./bin/arduino-cli compile -b arduino:avr:uno code --libraries $HOME/.arduino15/libraries/ --build-path ./build --clean + +echo "Starting simulation..." + +sleep 1 + +xdotool key ctrl+shift+p +xdotool type "Wokwi: Start Simulation" +xdotool key Return \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..0998f91 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Run", + "type": "shell", + "command": "${workspaceFolder}/.vscode/run", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6f87529 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Trabalho prático de SE 3 + +## Instruções para executar + +Para executar o trabalho (vscode) basta primir as teclas `Ctrl` + `Shift` + `B` diff --git a/bin/arduino-cli b/bin/arduino-cli new file mode 100755 index 0000000..e43d830 Binary files /dev/null and b/bin/arduino-cli differ diff --git a/code/code.ino b/code/code.ino new file mode 100644 index 0000000..cc0a283 --- /dev/null +++ b/code/code.ino @@ -0,0 +1,14 @@ +void setup() { + Serial.begin(9600); + pinMode(LED_BUILTIN, OUTPUT); +} + +void loop() { + Serial.println("Hello Teste para o TP3 :)!"); + digitalWrite(LED_BUILTIN, HIGH); + delay(500); + digitalWrite(LED_BUILTIN, LOW); + delay(500); +} + + diff --git a/diagram.json b/diagram.json new file mode 100644 index 0000000..cdd96fd --- /dev/null +++ b/diagram.json @@ -0,0 +1,8 @@ +{ + "version": 1, + "author": "Anonymous maker", + "editor": "wokwi", + "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": -28.2, "left": -10.2, "attrs": {} } ], + "connections": [], + "dependencies": {} + } \ No newline at end of file diff --git a/wokwi.toml b/wokwi.toml new file mode 100644 index 0000000..2b64206 --- /dev/null +++ b/wokwi.toml @@ -0,0 +1,4 @@ +[wokwi] +version = 1 +firmware = 'build/code.ino.hex' +elf = 'build/code.ino.elf' \ No newline at end of file