This makes little sense to me.
- Any device that requires programming requires a programmer and is not a consumer device.
- Python is no easier to learn or use than C++. They both have the same control-flow constructs and the same programming model.
- You chose to use Micropython because you thought it was easier. You ended up using two different languages, making your life, your workflow, and the difficulty for someone to work with the code all that much harder.
- C++ lets you get at everything on the machine.
- C++ on microcontrollers is real-time -- no garbage collection, no paging, no timesharing.
- C++ is orders of magnitude faster.
- There are over a million hobbyists who cut their teeth on Arduinos, writing their first code in C++.
- There is a lot more code to steal and use as examples for the Arduino than for Micropython.
- You save a buck or two because C++ doesn't require the more powerful processor with more memory.
Python is a wonderful language.
But running an interpreted subset of it on a microcontroller just adds to your headaches.
C++ just isn't that hard to learn, and Python isn't easier to learn.
There are easily 10 times as many self-taught C++ programmers as Python programmers.
All because of the ubiquity of the Arduino platform.
I taught C++ programming to artists with no technical background at all and wrote that textbook for the course.
They all did beautifully (literally -- they made beautiful things).
Now, all that said, if you want to make your platform programmable by anyone, you might start with the BBC Micro:bit.
You can program it in Blockly (similar to Scratch, where you drag and drop blocks onto the screen that connect into programs).
I've put children in front of a laptop running the Micro:bit version of Blockly, and they picked it up quickly without any help from me, making shapes on the LED display, making it change the lights when tilted or shaken, and all kinds of other fun. No syntax, so you can't make syntax errors. Everything is visible. And the Micro:bit has Bluetooth, runs off of batteries or USB, has a 3-axis accelerometer and 3-axis magnetometer, buttons, light sensor, and is easily interfaced to other things using nothing more than alligator clips. And if you don't like programming by dragging and dropping blocks on a screen, it accepts Javascript (the blocks are compiled into Javascript) and Micropython (which is not as easy to program in as Javascript on the Micro:bit, but easy enough).
On Mon, Mar 18, 2019 at 12:05 PM Nathan McCorkle <nmz787@gmail.com> wrote:
On Wed, Mar 13, 2019 at 10:35 AM Simon Quellen Field <sfield@scitoys.com> wrote:
>
> I don't wish to hijack this thread, so I changed the subject line.
>
> John didn't say why he preferred micropython to C++ (which he called "the arduino language"). But the compactness and speed of C++ code over an interpreted subset of Python gives it a substantial advantage on small processors, where both CPU execution speed and memory space are both limited.
I think the bigger reasoning for choosing Micropython to deploy on
programmable lab gear is the end-users often lack reasonable coding
skills. For example many biologists I knew in my undergrad stuggled
with email and Excel spreadsheets... biologists John and I have tried
interfacing with as beta testers for the open-source electroporator
have struggled with deleting and copying files from a github clone to
a Micropython 'drive'.
So I don't have a sliver of hope that the **average** biologist or
chemist would be able to handle hacking on C++ to automate or alter
lab gear. Now after some thought, maybe these folks wouldn't be able
to handle Python either... but I think there's certainly less barrier
and an easier ramp to climb.
As you said, Micropython itself is written in C++... so performance
really isn't an issue since their documentation provides good examples
of writing C modules for Micropython.
This is exactly what I did to use the DMA feature of the
microcontroller John chose for the culture-shock electroporator, when
I wanted to collect ADC samples from the High-Voltage output while
actively pulsing, and to start working on an automated solution to
voltage-limiting (so the user didn't have to specify the low-level
pulse-width timings, which is unlike any existing electroporation
protocol which just deal with overall time-scale and max voltage).
--
-- You received this message because you are subscribed to the Google Groups DIYbio group. To post to this group, send email to diybio@googlegroups.com. To unsubscribe from this group, send email to diybio+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+unsubscribe@googlegroups.com.
To post to this group, send email to diybio@googlegroups.com.
Visit this group at https://groups.google.com/group/diybio.
To view this discussion on the web visit https://groups.google.com/d/msgid/diybio/CA%2B82U9JdrkCDpVfguCMc0vh8m8HsApL-VebHr7conZQzfKi8gQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups DIYbio group. To post to this group, send email to diybio@googlegroups.com. To unsubscribe from this group, send email to diybio+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups "DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diybio+unsubscribe@googlegroups.com.
To post to this group, send email to diybio@googlegroups.com.
Visit this group at https://groups.google.com/group/diybio.
To view this discussion on the web visit https://groups.google.com/d/msgid/diybio/CAA0yOM6gwoT%2BPVNmQQLXV7X_w%2BhnPpwu8VcRg72pKg8_zFn01g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
0 comments:
Post a Comment