EEVblog® Electronics Community Forum
Electronics => Microcontrollers => Topic started by: samdare on March 30, 2018, 09:25:46 pm
-
I am sort of good at python compared to C++,assembly and C and actually I love python compared to all other languages (no specific reason).So I just want to club python and embedded electronics is there a way that python hooks with microcontroller or vice versa :-D
Sent from my Lenovo K8 Plus using Tapatalk
-
Yes https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython
Sent from my iPhone using Tapatalk Pro
-
Unlikely. There are some projects doing javascript though.
In general, running an interpreted language on a microcontroller is highly inefficient. If interpreted languages are used, they are often limited to user programmable equations in larger programs. Eg: A PLC formula fields.
Just learn to type { and ; instead of [tab] and you'll be good to go! :P
-
Yes https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython
Sent from my iPhone using Tapatalk Pro
Just had a glance, looks cool ,thanks
Sent from my Lenovo K8 Plus using Tapatalk
-
Unlikely. There are some projects doing javascript though.
In general, running an interpreted language on a microcontroller is highly inefficient. If interpreted languages are used, they are often limited to user programmable equations in larger programs. Eg: A PLC formula fields.
Just learn to type { and ; instead of [tab] and you'll be good to go! [emoji14]
[emoji23][emoji23][emoji23] quality humor.
Sent from my Lenovo K8 Plus using Tapatalk
-
Unlikely. There are some projects doing javascript though.
In general, running an interpreted language on a microcontroller is highly inefficient. If interpreted languages are used, they are often limited to user programmable equations in larger programs. Eg: A PLC formula fields.
Just learn to type { and ; instead of [tab] and you'll be good to go! [emoji14]
JavaScript!!,repository names?
Sent from my Lenovo K8 Plus using Tapatalk
-
https://www.espruino.com/ (https://www.espruino.com/) is one of them.
-
https://www.espruino.com/ (https://www.espruino.com/) is one of them.
Thanks
Sent from my Lenovo K8 Plus using Tapatalk
-
There's also http://micropython.org/ (http://micropython.org/) - it's the foundation for the https://openmv.io/, (https://openmv.io/,) for example.
-
There's also http://micropython.org/ (http://micropython.org/) - it's the foundation for the https://openmv.io/, (https://openmv.io/,) for example.
The openmv site outdated ,404 error
Sent from my Lenovo K8 Plus using Tapatalk
-
This thing https://en.wikipedia.org/wiki/Micro_Bit (https://en.wikipedia.org/wiki/Micro_Bit) was handed to me at a Python conference last year. Developed for UK schoolkids to learn programming. Maybe it could also be for programmers who want to get started on microcontrollers?
Edit: This is the online IDE you can use:
http://python.microbit.org/v/1 (http://python.microbit.org/v/1)
Website IDE turns your Python code into a downloadable binary blob, you plug in your micro into your PC, it shows up as a hard drive, you copy the blob to the drive, done.
-
As mentioned, there's CircuitPython and MicroPython, each with its "native" boards. The difference, to the best of my knowledge, is that MicroPython was optimized specifically for MCUs in some ways, while CircuitPython tries to stay true(r) to the original Python syntax.
Both are very limited. Obviously you can't just import any Python library, and what you do have will be slow and heavy on the microcontrollers' resources. I've done a couple of little demo projects on the BBC Micro:bit and a Pyboard clone from China. It's fun, arguably excellent for getting children interested in embedded/programming, but for more serious work you'll hit the limitations of these languages very fast.
-
As mentioned, there's CircuitPython and MicroPython, each with its "native" boards. The difference, to the best of my knowledge, is that MicroPython was optimized specifically for MCUs in some ways, while CircuitPython tries to stay true(r) to the original Python syntax.
CircuitPython = MicroPython + Adafruit's device drivers for talking to Adafruit developed hardware.
-
I am sort of good at python compared to C++,assembly and C and actually I love python compared to all other languages (no specific reason).So I just want to club python and embedded electronics is there a way that python hooks with microcontroller or vice versa :-D
Do a Google search for "micropython memory fragmentation" before going down this road.
If high reliability is important, then Python may not be the best solution.
-
CircuitPython = MicroPython + Adafruit's device drivers for talking to Adafruit developed hardware.
Ah, found it:
https://theamphour.com/383-an-interview-with-scott-shawcroft/
(from 28:00)