Skip to content

Commit

Permalink
Version 3.5 For Arduino Gateway Mods
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYsLab authored and MrYsLab committed Sep 18, 2019
1 parent 9b1a6f0 commit 7262bb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions projects/OneGPIO/arduino_uno/arduino.html
Original file line number Diff line number Diff line change
Expand Up @@ -1474,8 +1474,8 @@ <h1>Banyan Demo Station For Arduino Uno</h1>
echo = parseInt(echo, 10);


msg = JSON.stringify({"command": "set_mode_sonar", "trigger": trigger,
"echo": echo});
msg = JSON.stringify({"command": "set_mode_sonar", "trigger_pin": trigger,
"echo_pin": echo});
socket.send(msg);

}
Expand Down
3 changes: 3 additions & 0 deletions projects/OneGPIO/arduino_uno/arduino_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,16 @@ async def set_mode_sonar(self, topic, payload):
:param payload: {"command": "set_mode_sonar", "trigger_pin": “PIN”, "tag":”TAG”
"echo_pin": “PIN”"tag":”TAG” }
"""

trigger = payload["trigger_pin"]
echo = payload["echo_pin"]
self.pins_dictionary[trigger][GatewayBaseAIO.PIN_MODE] = GatewayBaseAIO.SONAR_MODE
self.pins_dictionary[echo][GatewayBaseAIO.PIN_MODE] = GatewayBaseAIO.SONAR_MODE

await self.arduino.set_pin_mode_sonar(trigger, echo, cb=self.sonar_callback)



async def set_mode_stepper(self, topic, payload):
"""
This method establishes either 2 or 4 GPIO pins to be used in stepper
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='python-banyan',
version='3.5',
version='3.6',
packages=[
'python_banyan',
'python_banyan.banyan_base',
Expand Down

0 comments on commit 7262bb6

Please sign in to comment.