manicken / arduinoapiwebserver Goto Github PK
View Code? Open in Web Editor NEWA tool plugin for Arduino IDE that starts a webserver, that is used to add/remove/rename code files and control verify/compile and upload functions
A tool plugin for Arduino IDE that starts a webserver, that is used to add/remove/rename code files and control verify/compile and upload functions
Hi Jannik,
I found your thread on the Arduino forum but it was closed. This was the next best thing to be able to talk to you!
Thank you for your Arduino IDE tool examples. They have been very helpful for me to understand what the hell is going on! I am a pretty novice Java programmer.
I wonder if you could shed some light on something I am trying to do. I want to have a webserver running as an IDE tool with one UI window that you can leave open all the time.
Changing window focus to another sketch would change some parameters in the web server (root directory, listen port etc).
So far I have a very janky solution. The init(Editor)
method of the tool plugin uses a boolean set by processing.app.PreferencesData
so it will only run the UI/webserver setup once. In the UI class setup method, a listening socket is set up and the port number returned to be stored by preferencesData
. Subsequent executions of init(Editor)
will skip calling the UI/webserver setup because of the boolean set, but pull the port number out of preferencesData
so they can all talk to the same instance of the UI over the socket.
This works but seems very complicated. I would like to have my UI and webserver in other classes and just create one instance of them. I've tried using the UI/webserver classes statically and using singleton pattern, but the IDE always seems to ignore it all and I get another instance for every sketch window.
Do you have any clues as to how to prevent this? I have spent quite a while scrolling through the processing/arduino IDE source but to be honest I'm not really sure what I'm looking at most of the time!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.