micropython R1.9 ETA @@ released @@

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
jcea
Posts: 27
Joined: Fri Mar 18, 2016 5:28 pm

Re: micropython R1.9 ETA @@ released @@

Post by jcea » Mon May 29, 2017 10:21 pm

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...
+1, my friend. "On" and "off", in a PIN, doesn't make sense at all.

randmor
Posts: 18
Joined: Wed May 03, 2017 1:44 am

Re: micropython R1.9 ETA @@ released @@

Post by randmor » Tue May 30, 2017 3:55 am

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

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> 
Guess I'll have to leave a comment about this on one of Tony's videos to let them know there's
a problem.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: micropython R1.9 ETA @@ released @@

Post by pythoncoder » Tue May 30, 2017 4:20 am

@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.
Peter Hinch
Index to my micropython libraries.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: micropython R1.9 ETA @@ released @@

Post by deshipu » Tue May 30, 2017 5:38 am

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.

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: micropython R1.9 ETA @@ released @@

Post by stijn » Tue May 30, 2017 7:49 am

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...
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.

EasyRider
Posts: 94
Joined: Wed Dec 30, 2015 8:17 am

Re: micropython R1.9 ETA @@ released @@

Post by EasyRider » Tue May 30, 2017 9:39 am

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...
Another +1.

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.
:?

User avatar
bmarkus
Posts: 111
Joined: Tue Oct 21, 2014 5:58 am

Re: micropython R1.9 ETA @@ released @@

Post by bmarkus » Tue May 30, 2017 10:51 am

EasyRider wrote:
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...
Another +1.

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.
:?
While in general I agree with you, for me as an engineer True/False to indicate signal level is as useless as on/off.
Tiny Core Linux (piCore) developer
HAM radio call: HA5DI (Béla)

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: micropython R1.9 ETA @@ released @@

Post by stijn » Tue May 30, 2017 11:49 am

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.
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?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython R1.9 ETA @@ released @@

Post by pfalcon » Tue May 30, 2017 7:48 pm

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/

User avatar
TravisT
Posts: 72
Joined: Sun Feb 23, 2014 2:31 pm
Location: Portland, OR
Contact:

Re: micropython R1.9 ETA @@ released @@

Post by TravisT » Wed May 31, 2017 5:51 am

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.
_______________
Travis Travelstead

Post Reply