forked from grisp/grisp
-
Couldn't load subscription status.
- Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Quoted from @peerst (thank you so much !) :
From the Erlang level driver standpoint I would add a function
grisp_gpio:set_mode/1which takes atom values:
- disabled
- single
- continuous
In single mode calling the function that gets you the range does:
- enable sonar
- wait for serial message,
- disable sonar
- return value
possible implementation ?
set_mode(single) ->
configure(uart_2_txd, output_1, [default]),
Delay = 10, % 10ms just to make sure
timer:sleep(50 + Delay),
Range = pmod_maxsonar:get(),
configure(uart_2_txd, output_0, [default]).
(PR will to be opened if any success)
- implement "on/off" feature for Pmod MAXSONAR through GPIO pin configuration
- Ensure no unexpected latency occurs when sensor is activated/deactivated
- Ensure switching back to continuous/disabled modes works as expected
- Document (
⚠️ ⚠️ ⚠️ ) sonar triggering method for cross-talk avoidance - Provide estimate of minimum necessary delay before triggering each sensor such that cross-talk and total time between first and last measurement are minimal
- Open Pull Request on the Grisp runtime repository
LaymerLaymer
Metadata
Metadata
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed