Tweakly allows you to create dynamic code, using programming methods that are normally difficult to implement.
Visit the website »
View Demo
·
Report Bug
·
Create PR
Tweakly allows you to create dynamic code, using programming methods that are normally difficult to implement, allowing the user to reduce the writing of the code as much as possible to allow the latter to concentrate on the project to be implemented.
To use Tweakly you only need the Arduino IDE and one of the boards that work with it.
In development testing Tweakly was tested on:
- Arduino Uno
- Attiny85
- ESP8266
- ESP32
- SAMD21 (Arduino MRK Wi-Fi 1010 and Arduino Nano 33 IoT)
The Tweakly documentation is under development, it will be available in the coming months in Italian and English, in the meantime make use of the included examples and wait patiently :-)
For advanced examples you can visit the dedicated repository : https://github.com/filoconnesso/tweakly-examples
- From Arduino CLI
arduino-cli lib search Tweakly
arduino-cli lib install Tweakly
- From IDE Search "Tweakly" from Sketch->#include library->Library Manager
Tweakly bases its operation on millis() and allows you to create non-blocking code for your board.
It is essential to know that to work correctly you need to use methods that do not block the execution of your code, the main libraries available for the sensors may have delays inside them, but after the tests done in the development phase we have could verify that most of the libraries are tweakly-compatible.
Tweakly takes pin status into account with a built-in pin manager, so use that to initialize your pins:
Pad led(13);
With Tweaky's pin manager you can read and write values on all initialized pins and give them a name as you like, making your life a lot easier!
led.write(1);
led.read(); //1
If you want to create non-blocking code, rely on TickTimers.
TickTimer blinker;
Initialize it in setup() with:
blinker.attach(1000, [] {
led.toggle();
});
And your led will start blinking without blocking your code! Is not it fantastic ?
For more features, please see the Examples Folder
Use a fast baud rate to not affect the performance of your code:
Serial.begin(115200);
Use stringAssembler to assemble strings and format a dataset together:
int sensor_value;
char sensor_name;
...
String message = stringAssembler("your sensor %s has read %d C° \n", sensor_name, sensor_value);
Use Echo Stream for print to file and Serial :
Echo printer;
Serial.begin(115200);
printer.attach(&Serial);
printer.print("Hello, Friend \n");
In this video the first green LED flashes with at 250ms timer, the red LED flashes at 1000ms and the blue LED at 1500ms. The last two red LEDs have a pwm control.
Touch button # 3 is the play button, Touchpad # 2 freezes the melody and button # 1 pauses it.
Tweakly's new "Clock" component was used for the clock, which allows you to create virtual clocks and manage them separately.
All the code is handled by various TickTimers that guarantee non-blocking execution of everything.
Code : https://create.arduino.cc/editor/filoconnesso/0347b6f1-775b-4f70-bb65-e5fa197c5b39/preview
If you use Tweakly to create a project, tag us on Instagram and Twitter with the tag @filoconnesso and use the hashtag #createdwithtweakly. If you like the project don't forget to leave a star on GitHub and if you have tips and tricks to improve Tweakly create a Pull Request, we will try to accommodate you!
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Released under GPL by @filoconnesso.
Distributed under the open source GPL v.3.0 license. Read the license here.
In short :
Copyright (C) 2021 Filo Connesso - filoconnesso.it
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Filo Connesso - @FiloConnesso - [email protected]
Mirko Pacioni - @PacioniMirko - [email protected]
WebSite : https://www.filoconnesso.it/tweakly/