• Bluetooth GATTSCharacteristic GPy

    bluetooth gatt gpy network pycom
    13
    0 Votes
    13 Posts
    699 Views
    A
    Dear @shanefowler25, @shanefowler25 said in Bluetooth GATTSCharacteristic GPy: I just wasn't able to do a GET request for my application. May I humbly ask whether you wanted to connect using SSL here? I'm just asking because we didn't test these details thoroughly with our custom builds yet. @shanefowler25 said in Bluetooth GATTSCharacteristic GPy: Hopefully sometime in the future, there will be another update to the firmware that allows users to use Wifi/Bluetooth or Cellular/Bluetooth, without the program crashing and resetting the board. Issues around this "coexist" thing have even bitten Espressif Systems for quite a while, as outlined above. In this manner, the Pycom firmware is pretty much innocent here as it depends very much on the details coming from the ESP-IDF in this regard. @shanefowler25 said in Bluetooth GATTSCharacteristic GPy: My program would still crash when I used to Bluetooth to break the while loop of my program. While we are avid WiFi users, some people from our community are also approaching BLE these days. @poesel reported his observations on [1] and [2] already, but unfortunately he is currently traveling without being able to confirm our latest build would work better for him. He is using a GPy as well. @shanefowler25 said in Bluetooth GATTSCharacteristic GPy: I figured out a workaround that works for the application that I'm trying to do. Good that you found something that works for you. As we are currently trying to collect experiences from people affected by this issue on [3], we still ask anyone who could test the latest dragonfly builds. So, if you might find some time for that beyond working on your program, we would be more than happy to hear about the outcome. Thanks already and happy hacking. With kind regards, Andreas. [1] https://forum.pycom.io/topic/5358/1-20-0rc13-guru-meditation [2] https://community.hiveeyes.org/t/investigating-core-panics-with-ble-on-pycom-devices/2715 [3] https://community.hiveeyes.org/t/testing-the-custom-dragonfly-builds-on-pycom-devices/2746
  • wlan.scan() not working on FiPy

    12
    0 Votes
    12 Posts
    747 Views
    robert-hhR
    @andreas The typical structure you'll find in most MicroPythos-APIs for hardware devices is: there is a xxx_make_new (in this case wlan_make_new(), line 1279, mods/modwlan.c), which is called when the constructor in python is called. This function shows all the init arguments with its default values. It calls xxx_init_helper(). there is a xxx_init (in this case wlan_init(), line 1305, which more or less only calls xxx_init_helper(). and finally there is xxx_init_helper (here wlan_init_helper(), line 1145, which actually scans the supplied parameters and sets up the device. Parameters which are not supplied are set to the default values.
  • Use of RTC with XTAL and deepsleep

    rtc xtal32 deepsleep power saving
    6
    0 Votes
    6 Posts
    2k Views
    T
    @robert-hh I have the same impression. I had a 15 minutes deep sleep cycle running the night and the time was ~4 minutes off in the morning.
  • SPI read Issues

    1
    0 Votes
    1 Posts
    145 Views
    No one has replied
  • Bluetooh GATTCCharacteristic Notification

    1
    1 Votes
    1 Posts
    189 Views
    No one has replied
  • Pure Python library for reading DHT sensor on Pycom boards

    dht dht11 dth22
    57
    2 Votes
    57 Posts
    30k Views
    techykermitT
    @Jurassic-Pork I have an AMT2301/DHT21 sensor. Google says that it is similar to the DHT22 and should work with the same code. However, your library with DHT22 as the set sensor does not work. Do you know anything about if the sensor is supported or are you planning to add it in the future?
  • 0 Votes
    6 Posts
    328 Views
    T
    Actually, I don't want to shut down the device via En pin. But its seems that the power consumtion is also quite low, when Iout is low(during deep sleep). I will test this device.
  • Code structure and implementation (FSM)

    structure fsm best practices
    2
    0 Votes
    2 Posts
    626 Views
    A
    Dear @Jardar, we just answered a similar question by @danielm over at [1], so we are humbly pointing you there for an introduction to what we are trying to say here. In short, we are conceiving a medium-sized MicroPython codebase [2] called Terkin for MicroPython [3] for the Bee Observer project, which might well resonate with your questions and requirements. Following up on that, we are happy to answer your specific questions here. To what extent do you split your project into multiple submodules (.py files) Quite extensively, you might want to have a look at the terkin folder over at [4]. To what extend do you use classes vs. simple functions? We are trying to use as much OO techniques as possible. FSM (Finite State Machine) is a common way to implement FW. Do you use this? If FSM to what extend do you use this (just as part of specific logic or as the main structure of your program). Are there any best practice for how to implement FSM in Python? We are not using any FSM mechanics within our codebase yet. Is there any best practice in fault handling? Other important considerations What practices do you follow to harden your code with regards to reliability? As Python itself is pretty strong on exception handling, we are using this extensively. We are not doing anything special here but tried to find a good sweet spot between balancing things. It was important for us not to leave any gaps for unhandled exceptions which would make the program crash completely. Having appropriate logging in place was important for us in order to be able to follow up with the execution and to see what is going on. Logging Python tracebacks within the exception handlers helps tremendously when tracing hard to find bugs occurring after some runtime. Saying this, we are recording this logging output through the UART interface connected to a SBC like the RaspberryPi or BeagleBone in order support the process of detecting respective spurious glitches within the execution flow. We've outlined this at [5]. Enabling the watchdog functionality of the ESP32 is absolutely essential, you would do that with any kind of embedded development project anyway. However, we feel this detail is sometimes underestimated by people just starting with MicroPython development on these devices and give up hope too quickly after experiencing random crashes with their software. We hope this helps to give you at least some insights into the direction of your questions. With kind regards, Andreas. [1] https://forum.pycom.io/topic/3860/proper-structure-of-micropython-package [2] https://github.com/hiveeyes/hiveeyes-micropython-firmware [3] https://community.hiveeyes.org/t/developing-terkin-for-micropython/233 [4] https://github.com/hiveeyes/hiveeyes-micropython-firmware/tree/master/terkin [5] https://community.hiveeyes.org/t/monitoring-and-recording-the-serial-interface-output-of-a-microcontroller-attached-to-an-uart-interface/2430
  • Proper structure of MicroPython package

    best practices modules packages
    2
    3 Votes
    2 Posts
    535 Views
    A
    Dear @danielm, we are conceiving a medium-sized MicroPython codebase [1] called Terkin for MicroPython [1b] for the Bee Observer project, which might well resonate with your questions and requirements. So, we want to humbly point you to the terkin folder [2] within that repository which might spark some ideas for your development process on how to structure a codebase appropriately by using object oriented programming. Similar to what you are describing, the datalogger program also uses quite a bunch of 3rd party modules which will get populated into a dist-packages folder through make setup [3] after cloning the repository. Thus, these packages are not part of the repository itself but will be acquired at development/build time. Maybe this helps on giving you some ideas around what you have been asking for. With kind regards, Andreas. P.S.: Just recently, our datalogger program started to spark interest with others and we got support from @poesel to integrate support for BLE [4,5] (thanks!) as well as LoRa/TTN telemetry [6] from other contributors. Saying this, we will be happy to accept further contributions from the community as we are aiming to make this more generic beyond its original scope of beehive monitoring. [1] https://github.com/hiveeyes/hiveeyes-micropython-firmware [1b] https://community.hiveeyes.org/t/developing-terkin-for-micropython/233 [2] https://github.com/hiveeyes/hiveeyes-micropython-firmware/tree/master/terkin [3] https://github.com/hiveeyes/hiveeyes-micropython-firmware/blob/master/tools/setup.mk [4] https://community.hiveeyes.org/t/ble-fur-hiveeyes/2637 [5] https://community.hiveeyes.org/t/ble-gatt-auf-esp32-mit-micropython/2371 [6] https://community.hiveeyes.org/t/hiveeyes-micropython-datalogger-goes-lorawan-ttn/2691
  • RTC in combinattion with deepsleep unusable

    rtc deepsleep
    4
    0 Votes
    4 Posts
    583 Views
    A
    Dear @kjm, we can confirm the clock of the RTC works as intended after invoking machine.deepsleep() using the most recent firmware on a FiPy device. See also [1]. With kind regards, Andreas. [1] https://community.hiveeyes.org/t/strom-sparen-beim-einsatz-der-micropython-firmware-im-batteriebetrieb/2055/159
  • Universal IP67 Case holes

    2
    0 Votes
    2 Posts
    219 Views
    F
    @kylecjo could you open the holes? I am having same trouble. Thanks!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • _thread not working

    1
    0 Votes
    1 Posts
    353 Views
    No one has replied
  • urequests

    1
    0 Votes
    1 Posts
    202 Views
    No one has replied
  • Limit Access to Pycom via wifi by 2 clients

    2
    0 Votes
    2 Posts
    194 Views
    J
    @ElinhohHD This will limit to a toal of 2 Its, one of which is used for the module, so only one left for a client. What's the reason for limiting to 2 clients? Why not use some form of authentication instead?
  • No connection to Pytrack

    3
    0 Votes
    3 Posts
    190 Views
    P
    @robert-hh thanks, you already asked the correct question! I wanted to make sure that flashing the lastest firmware on the pytrack worked, so I connected it without any development board. I thought the (in my case fipy) is the shield, but it's vice versa that the fipy is the essential part right? Totally makes sense then, that it didnt work without the fipy. so together with the fipy it works, fine! Sorry for the newby question and mistake. And thanks for the fast reply best regards
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • SQL Database with GPY board

    sql database get gpy getting started
    3
    0 Votes
    3 Posts
    339 Views
    shanefowler25S
    Hi @jcaron, Thank you for answering, so I reviewed that other forum as well before and I am still a bit confused. I understand creating a server side script in python, php, etc. to execute the SQL queries, however, I’m lost at how to return the results over HTTP. I see the other forum talks about sending data to a MQTT broker, is that something I would have to do? Send the query results from the database to the broker and then subscribe to the MQTT?
  • Question about short delays

    sleep time
    6
    0 Votes
    6 Posts
    2k Views
    L
    Sleep() function actually suspends the processing of the thread in which it is called by the operating system, allowing other threads and processes to execute while it sleeps. With multiple threads and processes, sleep() suspends your thread - it uses next to zero processing power.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    8 Views
    No one has replied

Pycom on Twitter