Code: Select all
import pyb
rtc = pyb.RTC()
print(rtc.datetime())
rtc.datetime((2016,3,10,4,9,30,10,0))
print(rtc.datetime())
pyb.delay(2000)
print(rtc.datetime())
Code: Select all
import pyb
rtc = pyb.RTC()
print(rtc.datetime())
rtc.datetime((2016,3,10,4,9,30,10,0))
print(rtc.datetime())
pyb.delay(2000)
print(rtc.datetime())
I have the same problem... i put a coil battery on vbat for five minutes and all leds turn on very weaks.. after that, i connected usb and the leds blinks normally:chuckbook wrote:What is the output of rtc.info()?
After a full power cycle, including Vbat. Best to leave the board un-powered for a reasonable amount of time (1..2 minutes).
Code: Select all
>>> rtc.datetime()
(2000, 1, 1, 1, 0, 0, 0, 0)
>>> rtc.datetime()
(2000, 1, 1, 1, 0, 0, 0, 0)
>>> rtc.datetime()
(2000, 1, 1, 1, 0, 0, 0, 0)
>>> rtc.datetime()
(2000, 1, 1, 1, 0, 0, 0, 0)
>>> rtc.datetime()
(2000, 1, 1, 1, 0, 0, 0, 0)
>>> rtc.info()
262147
Take a look pythoncoder: i can't see nothing wrongpythoncoder wrote:@saulo With a battery providing 3V or thereabouts to vback and no power applied to V+ the LED's should not be on. I'd suggest checking your wiring.
I can. The RTC backup battery should be connected between vbak and gnd. The terminals you're using are for a LiPo battery. See https://micropython.org/static/store/im ... v1_1-E.jpgsaulo wrote:i can't see nothing wrong
my bad! i correct the wiring and it's working now thank you pythoncoder!pythoncoder wrote:I can. The RTC backup battery should be connected between vbak and gnd. The terminals you're using are for a LiPo battery. See https://micropython.org/static/store/im ... v1_1-E.jpgsaulo wrote:i can't see nothing wrong
Maybe that's why i wire wrong , i've gathered information in posts but i was not paying attention in pyboard version, thanks for the tip.dhylands wrote:Wow - that's confusing.
On the older boards, VBACK used to be called VBAT.
VIN/VUSB/VBAT should all be alternate power sources for the onboard regulator. The 3V3 pin is powered from that regulator.
Got it, thanks again for your help, i really appreciate it.pythoncoder wrote:My understanding is that if you connect a LiPo battery the Pyboard will draw power from it if USB is not connected. If USB is connected, power will be drawn from there. There is no mechanism for charging the LiPo battery on the Pyboard.