Running imported code
Posted: Fri Aug 24, 2018 7:08 pm
Ok, So I would like to create a project using a bunch of connected micropython boards.
Each board will have a different combination of inputs/outputs, etc.
Example:
Board Style 1: 8 analog inputs, 8 relay outputs
Board Style 2: 16 analog inputs, 8 relay outputs, 4 analog outputs
etc, etc.
All boards will communicate likely using mqtt or mqtt-sn(possibly coap but I'll explore this later)
What I would like is to have 3 levels of code.
1) micropython firmware/interpreter
2) main python script that will handle the communication, pin setup, etc
3) scripts loaded basically as a configuration from the main controller over the network.
I obviously want to be able to also update 1 and 2 level code over the network but my question is are there any issues loading dynamic script content on level 3 on the fly and storing it on the device for reboots?
I'm planning a distributed automation system where you would program function in something similar to blockly and the exported code would be loaded into the board over the network on the fly.
I've done a ton of development in node.js and haven't touched python very much in the last couple years. I've been working on developing using another platform but its been on the side burner because of how involved it was on the micro controller but after finding micropython I have a new hope and would like to revive my project.
I do have a fair bit of experience in python as I used it extensively before I switched to node.js. I had thought of running node.js using embedded linux but this seems like a far better, lower energy, and better supported idea.
Last night I bought 6 development boards including 4 fipy(because why not have 5 radios to play with) and 2 pyboards(because a part of my project involves 9 bit serial) and while I wait I'm flashing some ESP32-wroom I have lying around.
Actually after finding micropython I plan to revive a number of small projects that will be much more attainable using python.
Thanks for any opinions(Hopefully positive, lol)
Each board will have a different combination of inputs/outputs, etc.
Example:
Board Style 1: 8 analog inputs, 8 relay outputs
Board Style 2: 16 analog inputs, 8 relay outputs, 4 analog outputs
etc, etc.
All boards will communicate likely using mqtt or mqtt-sn(possibly coap but I'll explore this later)
What I would like is to have 3 levels of code.
1) micropython firmware/interpreter
2) main python script that will handle the communication, pin setup, etc
3) scripts loaded basically as a configuration from the main controller over the network.
I obviously want to be able to also update 1 and 2 level code over the network but my question is are there any issues loading dynamic script content on level 3 on the fly and storing it on the device for reboots?
I'm planning a distributed automation system where you would program function in something similar to blockly and the exported code would be loaded into the board over the network on the fly.
I've done a ton of development in node.js and haven't touched python very much in the last couple years. I've been working on developing using another platform but its been on the side burner because of how involved it was on the micro controller but after finding micropython I have a new hope and would like to revive my project.
I do have a fair bit of experience in python as I used it extensively before I switched to node.js. I had thought of running node.js using embedded linux but this seems like a far better, lower energy, and better supported idea.
Last night I bought 6 development boards including 4 fipy(because why not have 5 radios to play with) and 2 pyboards(because a part of my project involves 9 bit serial) and while I wait I'm flashing some ESP32-wroom I have lying around.
Actually after finding micropython I plan to revive a number of small projects that will be much more attainable using python.
Thanks for any opinions(Hopefully positive, lol)