Best method for sending large sets of data back to api as a file.
I have tried urequests and the post does not like the keyword files.
does anyone have a method they would like to share.
thanks
Kyle
Best method for sending large sets of data back to api as a file.
I have tried urequests and the post does not like the keyword files.
does anyone have a method they would like to share.
thanks
Kyle
Not sure if this will help.
I made a quick reader based on a [project I'm working on this also works on m5Paper as well it's nothing complex simple read and display, this is on a Basic Core unit
A quick video showing it working
https://youtu.be/qvtr6Vy-HwY
The Tags I use are these ones
make sure the port is correct otherwise the bytes out of range error pops up
I hope it helps
from m5stack import *
from m5ui import *
from uiflow import *
import unit
setScreenColor(0x222222)
uhf_rfid_0 = unit.get(unit.UHF_RFID, unit.PORTA)
uhf_rfid_0.set_region(uhf_rfid_0.REGIN_US)
uhf_rfid_0.automatic_freq_hopping(0xFF)
uhf_rfid_0.set_channel_freq(924.25)
epc_bool = 0
uhf_rfid_0.set_select_mode(0x01)
label0 = M5TextBox(128, 59, "Tag #", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label1 = M5TextBox(22, 106, "waiting ... ", lcd.FONT_Default, 0xFFFFFF, rotate=0)
while True:
# while not temp:
temp = uhf_rfid_0.single_polling()
if temp:
# label10.setText(str(temp))
print("-----")
print(temp[0])
print(temp[1])
print("-----")
label1.setText(temp[0])
wait(.5)
I have noticed it drains the battery of the M5Paper quite quickly. I have not tested that specifically as it was not a requirement for my project. The range is quite good at 50-70 cm.
I think there is a way to change the power and read strength, though I have not investigated too deeply. I am using other methods to alter read time. When I get to a stable point I will refine some more.
I made a quick reader nothing special and this is on a Basic Core unit
quick video showing it working
https://youtu.be/qvtr6Vy-HwY
The Tags I use are these ones
make sure the port is correct otherwise the bytes out of range error pops up
from m5stack import *
from m5ui import *
from uiflow import *
import unit
setScreenColor(0x222222)
uhf_rfid_0 = unit.get(unit.UHF_RFID, unit.PORTA)
uhf_rfid_0.set_region(uhf_rfid_0.REGIN_US)
uhf_rfid_0.automatic_freq_hopping(0xFF)
uhf_rfid_0.set_channel_freq(924.25)
epc_bool = 0
uhf_rfid_0.set_select_mode(0x01)
label0 = M5TextBox(128, 59, "Tag #", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label1 = M5TextBox(22, 106, "waiting ... ", lcd.FONT_Default, 0xFFFFFF, rotate=0)
while True:
# while not temp:
temp = uhf_rfid_0.single_polling()
if temp:
# label10.setText(str(temp))
print("-----")
print(temp[0])
print(temp[1])
print("-----")
label1.setText(temp[0])
wait(.5)
@tinkerer I'll extract out what I do for the reading and send it though I will test on my core unit as well
I'm off line tomorrow so give me a day to get back to you ok.
I'm using the same Unit with M5Paper and its working very well. I did get a similar error when I was first starting my project.
I did eventually get it working with the following set up.
uhf_rfid_0.set_region(uhf_rfid_0.REGIN_US)
uhf_rfid_0.automatic_freq_hopping(0xFF)
uhf_rfid_0.set_channel_freq(924.25)
epc_bool = 0
uhf_rfid_0.set_select_mode(0x01)
and then start waiting for tags with
def reader():
temp = None
count = None
clean = None
while True:
count += 1
# while not temp:
temp = uhf_rfid_0.single_polling()
if temp:
# label10.setText(str(temp))
print("-----")
print(temp[0])
print(temp[1])
print("-----")
this is on a separate thread and works quite well for my requirements.
The other issue I had and not sure if it was because I did not read correctly however. it works with the following tags (UHF RFID Tag ISO18000-6C)
Not sure if it helps, but I hope it offers some info thats of use.
reagrds
Kyle
Hi
Not sure if this will help. I was in a similar situation. However I found I was using the incorrect Tag type. I needed the following tag type ISO 18000-6C, EPC Class1 Gen2 standard protocol.
Once I had these tags the example code worked as expected, I now have a functional unit that reads multiple tags using M5Paper and M5 Core with Micropython, and is working well for my project.
@robski I have noticed when I use the m5burner and embed my details it connects quickly. However the use case is that the wifi details are not know before hand and can change at any time. So that does not seem to be an option.
@ajb2k3 thanks for the info its something I can work around in programming, just not optimal for user.
Hello,
I'm using wifiCfg.doConnect(ssid, pass) to connect to the local Wifi. Which it is doing however it takes sometimes a few minutes.
Is there a way to speed up this process or this delay seems to be as it is.
regards
Kyle
Just a FYI for anyone interested. After some experimenting I found the _thread works with micro python, which I wasn't aware of.
So threading works just how you think.
cheers