Minimal stater application using Electron and Serialport in an Ionic application.
- Angular application.
- Node 12
- Ionic CLI v6:
npm i -g @ionic/cli@6
- For windows development, install Windows-Build-Tools:
npm i -g windows-build-tools
git clone https://github.com/robsonos/serialportronic.git
cd serialportronic
npm install
- Serving with hot reload
npm run serve
- Serving with hot reload (production mode)
npm run serve:prod
- Building
npm run build
- Packaging
npm run pack
- Distributing (current platform)
npm run dist
- Distributing (all platforms)
npm run dist:all
- Building and packaging
npm run build:pack
- Building and distributing (current platform)
npm run build:dist
- Building and distributing (all platforms)
npm run build:dist:all
PS: You may need to run the build:pack
task before you run serve
for the first time, as electron-builder
will rebuild the required node modules for the current platform. The pack
and dist
tasks use the contents from the www
folder, so you need to build
the application first before using them. The application will be located inside dist
folder.
int period = 1000;
unsigned long time_now = 0;
void setup() {
Serial.begin(115200);
}
void loop() {
if (Serial.available() > 0)
Serial.write(Serial.read());
if (millis() > time_now + period) {
time_now = millis();
Serial.print("Hello World ");
Serial.println(millis());
}
}
This project is licensed under the MIT License - see the LICENSE.md file for details
Pull requests for new features, bug fixes, and suggestions are welcome!
This repository is inspired on Sung Hah Hwang`s serialportron project. Icons made by Freepik from Flaticon is licensed by CC 3.0 BY