Navigation

    M5Stack Community

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

    Posts made by akshaypatil

    • RE: Help to upgrade battery without any accessory for RGBW lamp project

      @felmue Thank you! Sorry for the late reply, got busy with something.

      Which ports do I add the battery externally? To "bat" and "gnd"?
      I was going to leave it barebones since it's not easy to find an alternative esp32 pico kit with a battery charging circuit onboard. (tiny tiny size)
      Would be cool to have an esp32 mounted on top of a li-ion cell, like how they have the protection circuits.

      posted in M5 Stick/StickC
      A
      akshaypatil
    • Help to upgrade battery without any accessory for RGBW lamp project

      I'm designing a battery-powered lamp for tables with M5StickC and,

      1. Can I replace the 80mah lipo with a 3300mah? (I don't want to use the battery HAT)
      2. How do I disassemble M5stickC beyond the 2 screws? (It's not easy to lift the board and get access to the battery.)
      3. Are there libraries to program RGBW neopixels for UIFLOW?(https://www.adafruit.com/product/2858)

      Thank you!

      posted in M5 Stick/StickC
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      @akshaypatil

      from m5stack import *
      from m5ui import *
      from uiflow import *
      from easyIO import *
      
      setScreenColor(0x111111)
      
      
      import BlynkLib
      BLYNK_AUTH = 'YOUR AUTH'
      blynk = BlynkLib.Blynk(BLYNK_AUTH)
      
      
      from machine import Pin
      import _onewire
      
      def init(pin):
        Pin(pin, Pin.OPEN_DRAIN, Pin.PULL_UP)
      
      def convert(pin):
        _onewire.reset(Pin(pin))
        _onewire.writebyte(Pin(pin), 0xcc)
        _onewire.writebyte(Pin(pin), 0x44)
      
      def read(pin):
        _onewire.reset(Pin(pin))
        _onewire.writebyte(Pin(pin), 0xcc)
        _onewire.writebyte(Pin(pin), 0xbe)
        tlo = _onewire.readbyte(Pin(pin))
        thi = _onewire.readbyte(Pin(pin))
        _onewire.reset(Pin(pin))
        temp = tlo + thi * 256
        if temp > 32767:
          temp = temp - 65536
        temp = temp * 0.0625
        return(temp)
      
      init(0)
      
      @blynk.VIRTUAL_READ(6)
      def v6_read_handler():
        blynk.virtual_write(6, "%.2f"%((read(0))))
      
      @blynk.VIRTUAL_WRITE(9) # Button Widget VPIN 9 at GPIO 26
      def my_write_handler(value):
        blynk.virtual_write(1, toggleIO(26))
      
      while True:
        blynk.run()
        convert(0)
        lcd.clear()
        lcd.font(lcd.FONT_DejaVu18)
        lcd.print(("%.2f"%((read(0)))), 15, 50, 0xff0000)
        lcd.print(digitalRead(26), 35, 90, 0xffffff)
        wait_ms(2)
      

      And this will toggle GPIO 26.
      Now with the Blynk "Eventor" widget, you can have a summer fan that switches on when the temperature is higher than 28. ;)

      posted in UIFlow
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      @robalstona

      from m5stack import *
      from m5ui import *
      from uiflow import *
      
      setScreenColor(0x111111)
      
      import BlynkLib
      BLYNK_AUTH = 'YOUR AUTH'
      blynk = BlynkLib.Blynk(BLYNK_AUTH)
      
      from machine import Pin
      import _onewire
      
      def init(pin):
        Pin(pin, Pin.OPEN_DRAIN, Pin.PULL_UP)
      
      def convert(pin):
        _onewire.reset(Pin(pin))
        _onewire.writebyte(Pin(pin), 0xcc)
        _onewire.writebyte(Pin(pin), 0x44)
      
      def read(pin):
        _onewire.reset(Pin(pin))
        _onewire.writebyte(Pin(pin), 0xcc)
        _onewire.writebyte(Pin(pin), 0xbe)
        tlo = _onewire.readbyte(Pin(pin))
        thi = _onewire.readbyte(Pin(pin))
        _onewire.reset(Pin(pin))
        temp = tlo + thi * 256
        if temp > 32767:
          temp = temp - 65536
        temp = temp * 0.0625
        return(temp)
      
      init(0)
      
      @blynk.VIRTUAL_READ(6)
      def v6_read_handler():
          blynk.virtual_write(6, "%.2f"%((read(0))))
      
      
      while True:
        blynk.run()
        convert(0)
        lcd.clear()
        lcd.font(lcd.FONT_DejaVu18)
        lcd.print(("%.2f"%((read(0)))), 15, 50, 0xff0000)
        wait_ms(2)
      
      

      This will push the ds18b20 temperature to value display widget "Value Display/Labeled Value" on Blynk.
      Don't forget to change the reading rate on this widget from "PUSH" to "1 sec".

      Let me know if it works! :)

      posted in UIFlow
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      Nevermind!
      I got it to work!! Yahoo!!!

      Thanks a million for the help! :))

      posted in UIFlow
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      @robalstona

      from m5stack import *
      from m5ui import *
      from uiflow import *
      
      import machine
      import time
      import onewire
      from dallas import ds18b20 as sensor
      
      setScreenColor(0x111111)
      
      sensor.init(26)
      
      
      while True:
        sensor.convert (26)
        time.sleep_ms(750)
        lcd.print((sensor.read(26)), 0, 0, 0xffffff)
        wait_ms(2)
      
      

      I'm getting "cannot import name ds18b20" error, how do I get around this?

      Thank you for helping me out!

      posted in UIFlow
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      @robalstona

      from m5ui import *
      from uiflow import *
      
      setScreenColor(0x111111)
      
      
      import time
      import onewire
      from dallas import ds18b20 as sensor
      
      sensor.init( pin )
      
      
      
      while True:
        sensor.convert ( pin )
        time.sleep_ms(750)
        print ( sensor.read( pin ) )
        wait_ms(2)
      

      Is this the basic code to display the temperature?
      Don't hesitate from thinking of me as a complete newbie, I have only been able to figure out basic logic/programming in python.
      The plan is to make a battery-heated lunchbox (my design thesis) that will be activated through blynk (or the button mstickC) and use the temperature reading to create a closed looped-feedback and switch it off.
      As simple as that sounds in my head. (but not really, as I have learned with time)
      :)

      posted in UIFlow
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      @robalstona Yes, that's exactly what I've been trying, without any success. :/
      I had made my own blocks for toggling GPIO pins in blynk with uiflow that would show a loading screen as soon as I clicked it, but with your blocks, it didn't work. (there is no loading notification)

      If possible, it would be really helpful to see the code in normal python format. So that I could make my own blocks and cross-check if it's not just my computer?

      Cheers!

      posted in UIFlow
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      @akshaypatil
      The code on github is shown as 1 line, hence the confusion in understanding it even a slight bit. I'm new to programming, have just figured out the basic functions in uiflow, therefore I might be pretty ignorant.

      posted in UIFlow
      A
      akshaypatil
    • RE: Ui Flow support for onewire and ds18x20

      @robalstona
      Hi! I was unable to get your uiflow blocks from github to work,
      the m5b files would not load into uiflow. (nothing happens)
      Are they compatible with uiflow 1.4.5?
      Secondly, I uploaded ds18x20.py using uPyloader and used "import ds18x20" in custom execute command. What steps do I take after to get the data from the sensor?
      If possible, could you paste the python code? Need it for my project.
      Thanks a lot!

      posted in UIFlow
      A
      akshaypatil
    • RE: Blynk on M5Stack via uiFlow and block-maker

      @akshaypatil

      Here are the blocks for uiflow,
      http://s000.tinyupload.com/index.php?file_id=08084396321658982238

      and don't forget to use it together with the one uploaded by @world101 (https://www.dropbox.com/s/xosetw0qzin722l/Blynk.m5b?dl=0)

      Cheers! :)

      posted in PROJECTS
      A
      akshaypatil
    • RE: Blynk on M5Stack via uiFlow and block-maker

      Done! :D

      from m5ui import *
      from uiflow import *
      from easyIO import *
      
      setScreenColor(0x111111)
      
      circle0 = M5Circle(40, 40, 25, 0xffffff, 0xffffff)
      
      
      import BlynkLib
      BLYNK_AUTH = 'Your Authentication KEY '
      blynk = BlynkLib.Blynk(BLYNK_AUTH)
      
            
      @blynk.VIRTUAL_WRITE(4) # Button Widget on V4
      def my_write_handler(value):
        toggleIO(26)
        
      
      while True:
        blynk.run()
        wait_ms(2)
      posted in PROJECTS
      A
      akshaypatil
    • RE: Blynk on M5Stack via uiFlow and block-maker

      @world101 Sure will!

      0_1587112370233_8d4fd9f2-8ad2-4cb8-9577-97318370cf43-image.png

      I was thinking if it was possible to insert the received virtual value from Blynk button here (orange block), one could toggle the GPIO pin.

      P.S. The push notifications work perfectly! Didn't add the notification widget. (silly me!)

      Now I just need to figure out to toggle GPIO through virtual values from the button.

      posted in PROJECTS
      A
      akshaypatil
    • RE: Blynk on M5Stack via uiFlow and block-maker

      @akshaypatil said in Blynk on M5Stack via uiFlow and block-maker:

      Hi! I'm a complete beginner learning to use stickC, I managed to figure out Blynk with Arduino, but now, I'd like to do it with uiflow.
      Since I have the latest versions of both (blynk.py - 0.2.6 & uiflow - 1.4.5.1), I wanted to know if the procedure is still the same. Also, if there are other reference links/good material to learn about esp32 with python, then do share!
      I'm an industrial design student trying to make a battery-powered heated lunchbox for my thesis, which I'd like to control with the phone and also show nice graphics using stickC.
      Any help appreciated!
      Thank you :)

      Alright!
      I figured how to upload and run the BlynkLib 0.2.0 on uiflow - 1.4.5. :D
      The device is successfully detected and shown running on the android app.
      Now, I only need to figure how to control/toggle GPIO pins through uiflow with Blynk. :)

      Any tips? :P

      P.S.
      The push notification is not working. Is this limited to M5Stack only? Or also possible on my device...

      0_1586982302153_b86f4476-65ee-4135-bce2-b761c18b4e98-image.png

      posted in PROJECTS
      A
      akshaypatil
    • RE: Blynk on M5Stack via uiFlow and block-maker

      Hi! I'm a complete beginner learning to use stickC, I managed to figure out Blynk with Arduino, but now, I'd like to do it with uiflow.
      Since I have the latest versions of both (blynk.py - 0.2.6 & uiflow - 1.4.5.1), I wanted to know if the procedure is still the same. Also, if there are other reference links/good material to learn about esp32 with python, then do share!
      I'm an industrial design student trying to make a battery-powered heated lunchbox for my thesis, which I'd like to control with the phone and also show nice graphics using stickC.
      Any help appreciated!
      Thank you :)

      posted in PROJECTS
      A
      akshaypatil