Hi all, it's working again for me (London, UK)
Posts made by tonyd
-
UIFlow Down?
Is anyone experiencing issues with UIFlow (and the burner tool when it tried to log in).
I can't log in to either v1 or v2. I am assuming there is some maintenance going on, but a warning would ge handy
-
RE: Glass2
@robski Thanks
I was looking on the GLASS2 page and there are no UIFLOW examples on there. I have come to the conclusion that GLASS2 is not fully implemented in UIFLOW2 as when I went back to UIFLOW1 there is a whole load of methods exposed on there. I may just have to learn a bit more about I2C and code via the Arduino IDE
Tony
-
Glass2
Hi All
I've got a Glass2 unit attached to a Atom Lite via a grove cable. I can't find any documentation around how to access it. In UIFLOW2, I've found a init block that gives this code
def setup(): global i2c0, glass2_0 M5.begin() i2c0 = I2C(0, scl=Pin(32), sda=Pin(26), freq=100000) glass2_0 = M5.addDisplay(i2c0, 0x3c, {"unit_glass2":True})
But I can't se how to access the glass to write text. Has anyone managed to do this?
Thanks
Tony
-
RE: M5Stamp C3U unable to load program
Thanks @felmue. When I looked at your code I realised my mistake. I'd been treating the RGB LED as a simple LED, not an RGB. I should have read the spec sheet! It's all working as expected. I have also managed to get the M5Stamp attached to Blynk.
Tony
-
RE: M5Stamp C3U unable to load program
Hi @NuttyMonk
What Pin did you assign to the LED? The examples have 21, but I think it's 2. I can compile code , but can't get the LED to flash. I can do a WIFI scan, so know the toolchain is working
Thanks
Tony
-
RE: LoraWAN868 demo error
Hi @felmue
I got a bit further. Instead of just using the demo app, I built the app up step by step from the separate unit components and put debug prints on each step. I have now got the code printing a message at the top of the loop containing the two if/do statements. So for me it seems that taking the demo code was the problem. I don't know why though as I essentially built the same code block by block. The next problem is that Things Network is not letting me in. I think I will have to switch to the arduino IDE as there is a bit more control over debugging there
Tony
-
RE: LoraWAN868 demo error
hi @felmue
Thanks for then help. I have stuck with the Atom and re-installed v1.10.2 and still get
Traceback (most recent call last):
File "<stdin>", line 6, in <module>
File "unit.py", line 152, in get
Unit: Please change unit LoRaWAN to other groveI'll leave it a while and try again after a re-boot in case anything is cached
Tony
-
RE: LoraWAN868 demo error
I tried to re-burn the M5Stick with the beta burner and it made the device unstable in that the screen was scrambled and it kept disconnecting from UIFlow. I re-burned on the stable burner and it sorted that out. When I tried to download the Lora demo code, the stick screen displays
'module' object has no atrribute 'LoRaWan'tony
-
RE: LoraWAN868 demo error
Hi @felmue
I had downloaded and burnt firmware, I downloaded the new beta burner and tried that. The unit I have added is LoRaWAN868, I used the default PORT A. The object I get is LoRaWAN868_0. I am using a Atom Lite and the error I now get is.
*Traceback (most recent call last):
File "<stdin>", line 6, in <module>
File "unit.py", line 152, in get
Unit: Please change unit LoRaWAN to other groveIt seems like its telling me to select another Grove Port, but the only choices are PORT A and Custom. I will try and use a M5Stick CPlus and see if that works
tony
-
LoraWAN868 demo error
Hi all
Has anyone managed to get the Demo to work? I followed the instructions for OTAA on here [https://docs.m5stack.com/en/quick_start/lorawan/ttn](link url) and also just plonked in the DEMO code in MFFlow. The run button completes, but looking at the terminal output I get this error
Connected to Serial Port!
Traceback (most recent call last):
File "flow/m5cloud.py", line 82, in _exec_fun
File "<string>", line 7, in <module>
File "unit.py", line 156, in get
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'LoRaWAN'As far as I know the M5Flow site doesn't expose the libraries, so I can't look at them.
Tony
-
RE: Use of GPIO pins
I came to exactly the same conclusion via brute force and ignorance!
I decided to ditch the EasyIO and played with the PIN option, one of the examples made it clear that the values 0-4 were virtual proxies . So I ended up with this, which works. I did not try 3.3v as I had it working on 5v on my arduino. Thanks for help
from m5stack import *
from m5ui import *
from uiflow import *
import machinesetScreenColor(0x111111)
l1 = M5TextBox(0, 225, "Intruder Status", lcd.FONT_Default, 0xFFFFFF, rotate=0)
cIntruder = M5Circle(117, 230, 5, 0xFFFFFF, 0xFFFFFF)pin0 = machine.Pin(26, mode=machine.Pin.IN, pull=machine.Pin.PULL_UP)
pin0.off()
while True:
if (pin0.value()) == 1:
cIntruder.setBgColor(0xff0000)
else:
cIntruder.setBgColor(0x33cc00)
wait_ms(2) -
RE: Use of GPIO pins
Hi all
I done some debugging (I had some non conditional code under the else:) and have now seen that the variable PIR which is set to digitalRead(0x1A) is never getting a HIGH (non zero) value.
So the question is only am I using digitalread correctly?
Thanks -
Use of GPIO pins
Hi all, a bit of a noob question
I have a M5Stick CPlus 1.1 and am trying to get a PIR working (not a HAT) using M5FlowThe python generated by blockly is
from m5stack import *
from m5ui import *
from uiflow import *
from easyIO import *
setScreenColor(0x111111)
PIR = None
label1 = M5TextBox(47, 106, "label1", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)
cIntruder = M5Circle(98, 208, 20, 0x1842b7, 0x8d1762)
while True:
PIR = digitalRead(0x1A)
if PIR == 1:
cIntruder.setBgColor(0xff0000)
else:
cIntruder.setBgColor(0x33ff33)
label1.setText(str(PIR))
wait_ms(2)I have used EasyIO to address GPIO26. I am assuming that EasyIO abstracts the complexity /definition of the GPIO to be a digital pin and that digitalRead will return 1 for HIGH and 0 for LOW. I have made the code a little inefficient by storing the value of the pin in a variable so that I can capture a value and output it to a label.
When run, the value of PIR is always 0, but the else portion of the IF statement does not appear to be executed as the colour of the circle does not change to green (0x33ff33).
The PIR component works. I have tested it on a arduino. When attached to the M5Stick, the PIR is getting 5v(tested on multimeter).
My questions are around the mapping of pins in M5Flow. Have I got it right that I use 26 to access GPIO26. I ask because when I looked at the PIN blade in M5Flow, the argument for the block is a dropdown with possible values 0-4, but EasyIO allows any value.
I can't find any decent documentation about EasyIO, the "docs" option on he M5Flow page is not very detailed.
Any help would be appreciated
Tony
-
RE: Block 101?
Hi all, I found some documentation on the M5 site. It looks a little out of date in that not all of the functions are described, but I am off and running...
Thanks
Tony -
Block 101?
Hi All
I am a retired software developer, used to coding c# in visual studio and just bought a M5 Stick CPlus for fun. I have a load of Arduino and Raspberry Pi boards and find them straightforward enough to code, as the toolchain is more familiar to me. I tried to put the battery %age of my stick on the display with blockly, easy right? Nope. I did not get very far. I learn best from reading. Does anyone know of a decent book that will give me an introduction to blockly?
Thanks,
Tony
Old programmers don't die, we just decompile