Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. f3rn4nd0d
    3. Posts
    • Continue chat with f3rn4nd0d
    • Start new chat with f3rn4nd0d
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by f3rn4nd0d

    • RE: [Solved]Any way to know the name of the SSID and other info with wifisetup?

      Well, I've managed to do on a different way, thanks a lot for your help. Here is the code:

      #import wifisetup
      #wifisetup.auto_connect()
      import network
      from m5stack import *
      from m5ui import *
      from m5_pin import *
      from m5mqtt import M5mqtt
      from time import strftime, ticks_ms, ticks_diff, sleep_ms
      import utime
      import _thread
      
      def connect(ssid,auth,timeout=6000):
          from network import WLAN, STA_IF, AP_IF
          global uplink
          uplink = WLAN(STA_IF)
          uplink.active(True)
          uplink.connect(ssid, auth)
          started= ticks_ms()
          while True:
              if uplink.isconnected():
                  return True
              else:
                  if ticks_diff(ticks_ms(), started) < timeout:
                      sleep_ms(100)
                      continue
                  else:
                      return False 
      
      wlan = network.WLAN(network.AP_IF)
      while True: 
        if connect('Wifi1', 'password1'):
          red='Wifi1'
          break
        elif connect('Wifi2', 'password2'):
          red='Wifi2'
          break
        
      print('connected to: ',red)
      ...
      
      posted in Micropython
      f3rn4nd0d
    • Core (Black) unit not compatible with UIFLOW?

      Edited It works, I don't know why but the gray unit display works without problem after flashing and the black one requires a press of a button to come alive.

      BR / Fernando

      posted in UIFlow
      f3rn4nd0d
    • RE: [Solved]Any way to know the name of the SSID and other info with wifisetup?

      @salty_good thanks, but I'm developing a little client in python that will connect to several wifi networks. The idea is to publish a different message via MQTT depending of the wifi it has connected to. I need to do it in python, maybe I can import a different library that gives me more options than wifisetup.

      F.

      posted in Micropython
      f3rn4nd0d
    • [Solved]Any way to know the name of the SSID and other info with wifisetup?

      Hello, as the title of this thread says, I need to perform specific actions depending of the SSID name. Any help with wifisetup? Thanks a lot!

      posted in Micropython
      f3rn4nd0d
    • RE: MicroPython Clock Task with RTC and NTP sync

      Just a little comment. I've used this code to have a tiny watch on a M5stick and it did not work till I added the connection to internet. So the code in my case looks like this:

      import wifisetup
      wifisetup.auto_connect()
      from m5stack import *
      from m5ui import *
      ...

      and then the rest of the code is similar, changing timezone and whatnot.

      Thanks for the code and best regards / Fernando

      posted in PROJECTS
      f3rn4nd0d
    • RE: Editing Python Code not persistent

      @ajb2k3 Yes, I knew about it. But I think that @hkubota was after is a little different. Maybe to have a way to start designing the ui of the app in UIFlow and then add specific functions in python editor. At least this is what I'm doing. So it would be good to be able to save the blocks and the code separately, and then you can either apply the changes (like a file diff) or not.

      Thanks for your help @ajb2k3!

      posted in UIFlow
      f3rn4nd0d
    • RE: Editing Python Code not persistent

      @hkubota What I'd prefer is to keep track of the changes in the code and that they appear in a different color. A text file with the changes to be applied can be saved together with the blocks code. Then you have a button to either apply the changes, so they appear in the python code in a different color and numbered so you can verify that all of them are in place, or you can choose to remove them to see the blocks code translated to Python for debugging purposes. Does it make sense?

      Best regards / Fernando

      posted in UIFlow
      f3rn4nd0d
    • RE: MQTT and Ui.Flow help needed

      @techno86 set Client ID is just a name for the client you are setting up. You can name it "client" (remove the quotes) if you want. User is your ID in Adafruit. Hope it is clear.

      posted in UIFlow
      f3rn4nd0d
    • RE: Members Introductions aka The Icebreaker discussion.

      @ajb2k3 nope, f3rn4nd0d in youtube

      You are welcome :)

      posted in General
      f3rn4nd0d
    • RE: Members Introductions aka The Icebreaker discussion.

      Ok, I go second then :)

      My name is Fernando and I live in Spain. I have taken some time off but I use to write on several Spanish blogs. You can find an article about M5Stack here in Xataka Home. I'm currently using UiFlow and I'm starting to like it a lot, although I am used to program ESP8266 and ESP32 devices using Arduino and C is my favourite language.
      Now I'm working to integrate Blynk with it for revisiting a project of mine and see if I can make it work better.

      :)

      posted in General
      f3rn4nd0d
    • RE: MQTT and Ui.Flow help needed

      @world101 It works! Thanks so much for your help!

      posted in UIFlow
      f3rn4nd0d
    • RE: MQTT and Ui.Flow help needed

      @hetzer Thanks, but I need it to work with Adafruit io :(

      posted in UIFlow
      f3rn4nd0d
    • MQTT and Ui.Flow help needed

      Hi, this is my first test using UI.Flow and MQTT and I'm pretty stuck. Could you please take a look at this code and tell me what is wrong with it? Thanks!

      0_1554126494752_Captura_de_pantalla_2019-04-01_a_las_15_44_33.png

      posted in UIFlow
      f3rn4nd0d
    • M5UI.Flow and Blynk?

      Hello, I'm looking for some micropython code to integrate http://flow.m5stack.com/ with Blynk. Any help would be great. Thanks a lot!

      posted in Cores
      f3rn4nd0d