Is there a difference on Powering Expansion Board & Sipy via USB or via JST ?
Good evening Everyone,
I've recently bought a Sipy + Expansion Board (actually a pack of 5), in a view to create a very simple alarm for door check with Sigfox messsage sending
I'm reading the status of GND connected to G28 in order to check if the circuit is closed (door closed) or opened (door opened) with a simple ILS + magnet.
All is working like a charm when the board is powered through the USB socket, but does not work while only powered via the JST + Battery. The battery is self sufficiant, but everythings looks like the expansion board is no more capable to send the message to the Sipy.. even the Sipy is working fine...
Here below my very simple code :
from machine import Pin,idle
Door1 = Pin('G28', mode=Pin.IN, pull=Pin.PULL_UP)
def LoopDoor1(delay, id):
if Door1.value() == 0:
while Door1.value() == 0:
if Door1.value() == 1:
while Door1.value() == 1:
def FiveSecondLoop(delay, id):
_thread.start_new_thread(LoopDoor1, (1, 1))
_thread.start_new_thread(FiveSecondLoop, (1, 2))
When powered by USB: disconnecting the wire cause the LED to be RED for few seconds, reconnection cause it to be GREEN, while every 5 seconds, the Orange is blinking.
When powered from JST + Battery : the Orange is blinking every 5 Seconds, but no RED/GREEN while disconnecting/reconnecting the wire...
Did i missed something ? Did i do something wrong ??
the intention of using the JST is to prevent somebody from disconnecting the mains...
I can obviously find a way to have a permanent USB power.. but this is not the use of JST connector..
Thanks all for your help
PS : the code with Sigfox has been removed.. this is not the problem topic.
Replying to myself :-).
I've tested with Pin G22, (instead of G28 in my initial post).. and all works as a charm..
... let's turn it into an advantage.. i now know when the USB is powered (from the mains) or not... and can trigger another alarm with "Power has disappeared"..
@Pycom : if you could release/share more details on each PIN Status/Usage (it may exist already, but did not find it myself). Thanks in advance for your help.