-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
virtual_write for map widget point updates #46
Comments
More details, for the REST API get method vs a virtualWrite @ arduino, I compiled a c/arduino sketch and all worked right. For map, I also captured in input text wigget what was send to V60 virtual pin where I attached the widget map and get this: But with Arduino I have got 0-34.507-56.128position#61 that seems the same but I note some control caracters between values like 0[non ascii]-34.507[non ascii]-56.128[non ascii]position#61 _#define BLYNK_PRINT Serial WidgetMap myMap(V60); void setup() Blynk.begin(auth, ssid, pass,IPAddress(192,168,1,2),8080); int index = 0; myMap.location(index, lat, lon, "position#2"); Blynk.virtualWrite(V61, 0, lat, lon, "position#61"); void loop() |
Hi Kindmartin! When you can do it ( write value)?
To learn more about lib implementation capabilities I suggest you to examine examples for different operations |
Thanks, Anto, I will re-try and update. I think I tested a lot before on blynk.virtual_write(pin, 2, -33.754129, -56.6964227, 'test2') and similar, but for an unknown something it doesn't works (probably due the usual silly reason I cannot see). I will update soon. M |
It worked.... thanks and sorry for taking time without more self testing, /M |
one more thing before close this one. in arduino we can clean the widget map using myMap.clear() (related to WidgetMap myMap(Pin) ) how we could clean/delete old points ? ,M |
Kindmartin!
Let's try this approach with python lib )) -> blynk.virtual_write(pin, "clr") |
It worked charmingly! Thanks Anto! PD I still have to understand fix why I get some IOerrors when I try to virtual write vpins _>>> bkwupdateBlynkLoc each 20 seg")
Traceback (most recent call last):
Traceback (most recent call last):
now as a workaround I force to blynk.disconnect() then connect() then do the virtual writes. Like: lib. is a module where I just import libraries for this project bkw. is another module where I have all hw related real pins declarations and class instances …. **async def loop_garbageC(each_s=60): async def updateBlynkLoc(each_s=5):
async def loop_blynk(each_ms=500): |
Kindmartin!
Can be related to HW python specific.
You mentioned micro_python - thus you need to import not c_python but micro_python lib in your script |
hi all. I'm struggling with this python lib trying to update points in a blynk app map/
I was reading https://community.blynk.cc/t/solved-maps-with-http-rest-api/15826/54 where a possible solution is to use that REST API to update.
Also https://community.blynk.cc/t/blynk-map-interface-update-from-blynk-library-python/27289 without a solution.
how I can update a map widget here with python lib, I fact I'm using an ESP32 running last official Micropython 1.15.
any hint?
thanks in advance.
M
The text was updated successfully, but these errors were encountered: