New
#931
Last edited by caperjack; 18 May 2022 at 12:47.
Last edited by caperjack; 18 May 2022 at 12:47.
Hi Kerry and Jack,
How are you guys doing?
My wife and I (and our 11 year old daughter) are planning to visit Nova Scotia this summer (we're flying from Toronto). Plane ticket and hotels are easy to find but all rental cars are fully booked. This is a long shot but do you guys, by any chance, know someone in Halifax who rents out a car? Just a regular car for driving around. There's so much to see there and we need wheels to get around.
I don't, no sorry. I was born and raised there but I haven't been up that way in ages. I can't drive very far with my back issues.
Looks like I'm hitting the 264kb limit with my code. I lose about 154 kb to the display buffer which leaves about 111 kb for my code to run in.
Going to have to go old school and watch every byte I use. I've removed the min max temperature part. Not really needed but would have been a nice feature to have. Only have the wind and rain sensors to code for. Hopefully I won't have to remove anything else.
Went over what I have and trimmed down / simplified a lot of the code. That should get me a little more breathing space. Going to have to figure out how to measure what I'm using?
hello, recently we had a power outage and both the cool devices you built for me were affected ,the senseHat one boots to all lights lit ,and the breakout board one boots and the sensors work but the date and time isn't correct is it a easy fix ?
Last edited by caperjack; 27 May 2022 at 15:34.
The Sense hat I don't know? Sounds like Raspbian isn't booting up? You could hook up a monitor to see what's going on during boot up.
Is the second one raspberry Pi powered or pi Pico powered, I don't remember?
If its a raspberry Pi its a bit cumbersome to reset the RTC.
If its a Pico it just needs the RTC set to the current time and date. You shouldn't need to do that but it happens some times with the Pimoroni RTC.
I have a python file you run from thonny to do it.
Open thonny and make sure its set for "MicroPython(Raspbeery Pi Pico)" lower right corner.
Plug the Pico in then click stop. If it's already plugged in press the reset, then click stop.
You need to edit this line rtc.set_time(0, 40, 4, 0, 28, 6, 2022) to what you want the date and time to be, then run it to set it.
Code:from pimoroni_i2c import PimoroniI2C from breakout_rtc import BreakoutRTC import time PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5} # i2c pins 4, 5 for Breakout Garden PINS_PICO_EXPLORER = {"sda": 20, "scl": 21} # Default i2c pins for Pico Explorer i2c = PimoroniI2C(**PINS_BREAKOUT_GARDEN) rtc = BreakoutRTC(i2c) if rtc.is_12_hour(): rtc.set_24_hour() #rtc.enable_periodic_update_interrupt(True) while True: rtc.set_time(0, 40, 4, 0, 28, 6, 2022) # rtc.set_time(sec, min, hour, weekday, date, month, year) # sec = 0-59 # min = 0-59 # hour = 0-23 # weekday = 0-6 # date = 1-31 # month = 1-12 # year = 2021 if rtc.update_time(): rtc_date = rtc.string_date() rtc_time = rtc.string_time() print("Date: ", rtc_date, ", Time: ", rtc_time, sep="") time.sleep(0.1)
Thanks for all you help,my memory is getting worse ,so doing this stuff is gettin harder to do and enjoy !
The second one is a pi zero , something for me to tinker with i guess , I think i got the sd card mixed up sense hat one ,when trying to boot it to antother card .. this sucks because i reall enjoyed having them running on the shelf
OK, that's the Pi Zero with the Red Pibow case on it.
Try this
Connect it to your WIFI and let it update the time.
Then open a terminal window and run
sudo hwclock -w
sudo hwclock -r