-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Portability between Microprocessors? #4
Comments
Just leaving this note for later, it should be possible to add conditional includes in our Arduino code which only require/enable certain features based on the board type. So if you're compiling for an ESP8266 it will include the Wifi features, otherwise (eg Arduno Nano) it will just use all the configuration default values. We'll want a default config file (eg We may need to implement a Configuration provider which is intelligent enough to load settings from the three different scopes:
One thing I'm not sure about is where we'll actually store this configuration (it may need a separate Issue to track this). |
I would prefer the EEPROM approach personally. I don't think we'll have a problem with that many cycles. These D1 Mini boards are about $3-4 on Amazon, so not bad. For the web server portion, I think we will need to implement a LittleFS (file system) to store a HTML page, CSS and could potentially also store the config there as a JSON file. Space will be tight, but I'm sure we wouldn't be using more than a 1/4 of the memory space for that. Definitely plan on having a |
I've done some testing and added some notes in #5 related to the filesystem and webserver. Apparently we can use this to detect the device automatically, so users won't need to change anything themselves when compiling: #if defined(__AVR__)
// AVR specific code here
#elif defined(ESP8266)
// ESP8266 specific code here
#endif |
For this version of the hardware I have decided to use the ESP8266 as the microprocessor. The main reason for that was the following:
That being said. There will only be a few things that the ESP8266 can do that the Arduino chips cannot and that is primarily running the web server and Wi-Fi connection. I think it would be ideal to allow for portability between boards so that an Arduino could be used if need be.
It would be good to have the settings stored and accessible with the ability to change them over the command line.
I've actually already written two utilities for a program that are run on the ESP32 to change settings:
https://github.com/CNCxyz/Grbl_Esp32_Utility (Qt program, EXE)
https://github.com/CNCxyz/Grbl_Esp32_Web_Utility (Web utility)
The web utility is what I would focus on and could adapt. It allows someone to plug their device into a computer and visit a web page in Chrome. Chrome can communicate with the device over the serial port and the configuration can be read and written back without downloading anything.
That would help people that may not want to go through the hassle of downloading Arduino and compiling customizations.
I think having the ability to disable Wi-Fi completely using the serial port would be ideal as well. It would help speed up the boot time.
The text was updated successfully, but these errors were encountered: