OpenGarage Forums Hardware Questions OG vs Adafruit Feather

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #102

    Anonymous
    Guest

    I’m interested in creating this project but need to modify the code for a Parallax Ping (I have one collecting dust that I can use), so I wanted to mock this up on an Adafruit Feather to do the dev work. https://learn.adafruit.com/adafruit-feather-huzzah-esp8266/overview

    The problem at the moment is the feather keeps rebooting with this code (see example of errors below). I’ve already tried moving pin assignments to avoid “special purpose” pins on the Feather like P0. I’ve also reviewed the code to see if there was a method/function that was causing the reboot that I might be able to comment out but couldn’t see anything obvious. It’s also worth mentioning that I’ve not yet connected any hardware to the Feather to avoid any sort of interactions there.

    Thoughts on where to look or possible root causes?

    Errors from console
    Soft WDT reset

    ctx: cont
    sp: 3fff0650 end: 3fff08a0 offset: 01b0

    >>>stack>>>
    3fff0800: 3ffef788 00000374 00000374 4020b957
    3fff0810: 3fff2394 3ffef554 00000000 4020b99c
    3fff0820: 0104a8c0 3ffef574 3ffef5b5 4020d4be
    3fff0830: 3fffdad0 3ffef554 3ffef5b5 4020e6e9
    3fff0840: 3ffe9160 0104a8c0 40211178 40211164
    3fff0850: 00000000 00000000 00000000 4020d394
    3fff0860: feefeffe feefeffe feefeffe 3ffef86c
    3fff0870: 3fffdad0 00000000 3ffef864 40206ddc
    3fff0880: feefeffe feefeffe feefeffe 4020ff88
    3fff0890: feefeffe feefeffe 3ffef880 40100718
    << tail 8
    chksum 0x2d
    csum 0x2d
    v3de0c112

    #150

    Anonymous
    Guest

    After a bit more investigation I’ve found that the DEBUG_PRINTLN(og.read_distance()) call in check_status_ap() was causing the watchdog failure. So I need to dig deeper into the read_distance method to isolate the error and fix it since I’ve already made a couple of code changes there.

    #151

    Anonymous
    Guest

    UPDATE: It seems the core problem was when no signal is being received from the distance sensor that function waits indefinitely which causes the watchdog timer to intervene. I reverted back to the original distance sensing code and modified the hardware to allow for the Parallax Ping. The hardware change I made was pretty simple, the Parallax Ping has a shared pin for the trigger and echo. So I put a diode on the trigger pin to protect it from the 5V return and a voltage divider on the echo pin to reduce 5V to 3.3V. (1.3K and 3.3K resistors) This works well and is accurate with no code changes.

    #153

    Ray
    Keymaster

    You are right — the read_distance() function expects a working ultrasonic distance sensor is connected on the specified pins. Without the sensor, the read_distance() function will time out causing ESP to reboot.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

OpenGarage Forums Hardware Questions OG vs Adafruit Feather