@gavin67890 I was able to get it working with 32/33 just by assigning with
uart1 = machine.UART(1, tx=32, rx=33)
which it looks like is the same the guy did in the video
@gavin67890 I was able to get it working with 32/33 just by assigning with
uart1 = machine.UART(1, tx=32, rx=33)
which it looks like is the same the guy did in the video
@jkeyser
never mind, changing gain fixed it
adc0.atten(machine.ADC.ATTN_11DB)
I have a Core 2 and the M5GO BOTTOM2.
Attached to port B on the battery is a circuit that outputs a voltage between 0-3.3v. The output of the circuit is attached to GPIO 36. When plugged in, adc.read() always returns 4095, and when unplugged reads 0. It should be reading 1.5v (measured with multimeter). Any ideas what could be going wrong?
from m5stack import *
from m5stack_ui import *
from uiflow import *
import machine
import time
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
v = None
label0 = M5Label('label0', x=77, y=74, color=0x000, font=FONT_MONT_14, parent=None)
adc0 = machine.ADC(36)
adc0.atten(machine.ADC.ATTN_0DB)
adc0.width(machine.ADC.WIDTH_12BIT)
while True:
v = adc0.read()
label0.set_text(str(v))
wait_ms(5)
@gavin67890 I was able to get it working with 32/33 just by assigning with
uart1 = machine.UART(1, tx=32, rx=33)
which it looks like is the same the guy did in the video
@jkeyser if anyone comes across this in the future, at least on the core 2 the correct pins are 33/32
Trying to get this working, but am unable to send/receive anything at all https://shop.m5stack.com/products/rs485-module
Ive tried on the core (pins 17/16) and core 2 (pins 14/13).
For testing im just running this very basic code but can only get 'None' as a response. To send data im just using YAT and a USB->RS485 convertor which I have tested using a known-working device. Any ideas of what might be wrong?
from m5stack import *
from m5ui import *
from uiflow import *
uart1 = machine.UART(1, tx=14, rx=13)
uart1.init(9600, bits=8, parity=None, stop=1)
while True:
print(uart1.readline())
wait_ms(500)
@felmue
just tried, but the same thing happened.
One thing i did notice was if i initialize the LTE modem first, i dont get the index out of range error, but only the gps works. All the modem status checks such as get_single_quality() get_network_registration() return false as if it isnt even there.
I have these 2 modules along with the core 2. The LTE module is on pins 14/13, and the gps is on 1/3. LTE module is being powered externally.
https://shop.m5stack.com/products/gps-module
https://shop.m5stack.com/collections/m5-modules/products/com-lte-modulesim7600g?variant=35800524488868
When used separately, everything works fine, but when using both at the same time i get this error as soon as i try to initialize them.
File "<string>", line 35, in <module>
File "comx/lte.py, line 27, in __init__
File "libs/simcom/common.py", line 164, in ...
IndexError: list index out of range
@ajb2k3 Maybe im misunderstanding how it works, but I believe you have to upload the certificates to the modem itself using AT commands.
What i ended up doing was uploading the certs to the device, then just doing an open() in python, then sent those over UART using AT commands to the modem. Everything is working fine now, but not sure if this is the 'proper' way to do it.
@ajb2k3 normally I use the vscode extension, but for basic testing right now im using uiflow
How should i go about uploading certificates for mqtt to the LTE module?
Mainly im looking for how they should be formatted. Currently im just copy-pasting the raw text from the .pem file and uploading it over UART/AT commands, but i keep getting ssl errors and i suspect its because the certificates are not being read in correctly. Ive also tried a string with \n after each line.
EX:
AT+CCERTDOWN="clientcert.pem", 1219
> {raw string of .pem cert}