+1, my friend. "On" and "off", in a PIN, doesn't make sense at all.marfis wrote:I guess he meant it was never part of the machine module (pyb still supports high/low)
To me, high/low refers to an electrical state, and that is what a pin's state is. It is somewhat confusing that on/off is now used for both signal and pins... but maybe it's just me...
micropython R1.9 ETA @@ released @@
Re: micropython R1.9 ETA @@ released @@
Re: micropython R1.9 ETA @@ released @@
Seems something is not working with Adafruit Feather ESP8266 Board with FeatherWing ILI9341 TFT LCD Display using Tony DiCola's port of the ili9341.mpy and rgb.mpy when running this new v1.9 release of Micropython. The code example below worked just fine for MicroPython v1.87. Any ideas? Otherwise, it's back to v1.87 until I hear otherwise. Here is a link to Tony's video on the ILI9341 TFT LCD display board for the Adafruit Feather ESP8266:
https://youtu.be/9wsJzVeN_m8?list=PLjF7 ... Z8OO142eia
Guess I'll have to leave a comment about this on one of Tony's videos to let them know there's
a problem.
https://youtu.be/9wsJzVeN_m8?list=PLjF7 ... Z8OO142eia
Code: Select all
>>> uos.listdir()
['boot.py', 'ili9341.mpy', 'rgb.mpy', 'gtest1.py']
>>> import gtest1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "gtest1.py", line 21, in <module>
ValueError: incompatible .mpy file
>>>
/home/randmor> cat gtest1.py
#
# Target machine: Adafruit Feather ESP8266 & FeatherWing IL9341 TFT display
# Notes on the Adafruit ILI9341 TFT interface:
#
# HSPI Signal: GPIO Pin Number: Comments:
# MOSI GPIO13 HSPI Bus, "Master Out, Slave In" signal
# MISO GPIO12 HSPI Bus, "Master In, Slave Out" signal
# SCLK GPIO14 HSPI Bus, "Serial CLock" signal
# CS GPIO15 HSPI Bus, "Chip Select" (aka "Slave Select") signal
# "DC" GPIO0 Non-standard pin used to facilitate ILI9341 TFT interface
#
# Note that the ESP8266 HSPI Interface uses GPIO pins 12, 13, 14, and 15.
# Also note that this particular Adafruit ILI9341 TFT interface requires one
# additional signal line (GPIO0). Also, be aware that GPIO12 is actually not
# being used in this particular interface. So, GPIO12 is available for other uses.
#
# Draw 4 filled rectangles with each rectangle filling 1 of 4 equal sized quadrants
#
import ili9341 # Use ILI9341 TFT Display library module
import machine # Use ESP8266 Machine (hardware) library module
# Initialize SPI interface
spi = machine.SPI(1, baudrate=40000000)
# Initialize ILI9341 TFT display.
display = ili9341.ILI9341(spi, cs=machine.Pin(0), dc=machine.Pin(15))
display.fill(0) # Clear screen
display.fill_rectangle(0,0,120,160, ili9341.color565(255,0,0)) # NW Quadrant (red)
display.fill_rectangle(120,0,240,160, ili9341.color565(0,255,0)) # NE Quadrant (green)
display.fill_rectangle(120,160,240,320, ili9341.color565(0,0,255)) # SE Quadrant (blue)
display.fill_rectangle(0,160,120,320, ili9341.color565(255,255,255)) # SW Quadrant (white)
/home/randmor>
a problem.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: micropython R1.9 ETA @@ released @@
@randmor The error message says that the file was compiled to bytecode with an incompatible version of mpy-cross, the cross compiler. V1.9 has a new version: this must be compiled before use. Tony Dicola should be made aware of this. Otherwise rebuild mpy-cross locally and recompile the Python source.
Re Pins: see the developers' response to the issue I raised https://github.com/micropython/micropyt ... -304694048.
tl;dr
The quickref doc is in error. Code portable between old and new firmware can be written using the value() method.
Re Pins: see the developers' response to the issue I raised https://github.com/micropython/micropyt ... -304694048.
tl;dr
The quickref doc is in error. Code portable between old and new firmware can be written using the value() method.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: micropython R1.9 ETA @@ released @@
The quickref is there from the very beginning of the ESP8266 port and the machine module. It was basically the specification, before the rest of the documentation was written. There is literally nothing more "official" and "documented". And we have been writing code based on those scraps of documentation, and there are dozens of libraries using it.
And now we learn that no, that was never actually part of MicroPython, it was just a dream, we were hallucinating it. We should have followed documentation that didn't exist and the specification that was never actually created, then we would have been fine.
And now we learn that no, that was never actually part of MicroPython, it was just a dream, we were hallucinating it. We should have followed documentation that didn't exist and the specification that was never actually created, then we would have been fine.
Re: micropython R1.9 ETA @@ released @@
Not just you, I find it rather confusing as well.. In the digital world the state is usually described in an exact way using high/low or 1/0 or even true/false. In my experience (might be different for others) these are de-facto standards. E.g. I don't think I ever saw a truth table using on/off, none of my university books used it for describing digital state, etc. Furtermore, suppose the pin is driving a piece of 'active low' circuitry.. With on/off convention you set the pin 'on' but the meaning is actually 'off'. With low/high you just set it low, and it's active low, so that's all clear.jcea wrote:I guess he meant it was never part of the machine module (pyb still supports high/low)
To me, high/low refers to an electrical state, and that is what a pin's state is. It is somewhat confusing that on/off is now used for both signal and pins... but maybe it's just me...
Re: micropython R1.9 ETA @@ released @@
Another +1.jcea wrote:
I guess he meant it was never part of the machine module (pyb still supports high/low)
To me, high/low refers to an electrical state, and that is what a pin's state is. It is somewhat confusing that on/off is now used for both signal and pins... but maybe it's just me...
Whoever is responsible for on-off change , clearly has no professional background or competence in digital electronics or microcontroller hardware.
Appropriate use should be 1/0, High/low or True/False.
On/Off could be extremely confusing and potentially dangerous depending on hardware being controlled.
Re: micropython R1.9 ETA @@ released @@
While in general I agree with you, for me as an engineer True/False to indicate signal level is as useless as on/off.EasyRider wrote:Another +1.jcea wrote:
I guess he meant it was never part of the machine module (pyb still supports high/low)
To me, high/low refers to an electrical state, and that is what a pin's state is. It is somewhat confusing that on/off is now used for both signal and pins... but maybe it's just me...
Whoever is responsible for on-off change , clearly has no professional background or competence in digital electronics or microcontroller hardware.
Appropriate use should be 1/0, High/low or True/False.
On/Off could be extremely confusing and potentially dangerous depending on hardware being controlled.
Tiny Core Linux (piCore) developer
HAM radio call: HA5DI (Béla)
HAM radio call: HA5DI (Béla)
Re: micropython R1.9 ETA @@ released @@
Funny, I'm an electronics engineer and for me True/False is interchangable with High/Low or 1/0. Might depend on country/culture or so?bmarkus wrote:While in general I agree with you, for me as an engineer True/False to indicate signal level is as useless as on/off.
Re: micropython R1.9 ETA @@ released @@
All documentation at http://docs.micropython.org/en/latest/esp8266/ was updated to contain actual 1.9 information.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: micropython R1.9 ETA @@ released @@
Maybe I am just adding to the noise, but I would also agree that high/low is the most concise and describes the states the best. True/False and 1/0 mean about the same in my head, and I often use them also, but I feel it does not describe it as well when thinking pin states. Those three options seem reasonable.
On/Off seems potentially too misleading and does not teach/enforce more standard practice, at least how I see it.
Of course this is all just my opinion.
On/Off seems potentially too misleading and does not teach/enforce more standard practice, at least how I see it.
Of course this is all just my opinion.
_______________
Travis Travelstead
Travis Travelstead