Search found 75 matches

by PM-TPI
Wed Jul 20, 2022 7:51 pm
Forum: General Discussion and Questions
Topic: what file system
Replies: 9
Views: 8446

Re: what file system

Never formatted cards... We have units mfg in China https://www.thermcoproducts.com/SmartLOG-2021-Wireless-VFC-DDL.html looked to see what it says in format... FAT(default) w/allocation unit size = 32KB and Windows property says FAT I wish FAT were more specific FAT12 FAT16 FAT32 Even in micropython...
by PM-TPI
Wed Jul 20, 2022 6:57 pm
Forum: General Discussion and Questions
Topic: what file system
Replies: 9
Views: 8446

Re: what file system

I am using a 2GB SD sooo.... >>>uos.statvfs('/sd/data') (32768, 32768, 60469, 60463, 60463, 0, 0, 0, 0, 255) 32768KB * 60469 = 1 981 448 192 ~ 2GB and all that is usable? I will have 1 .csv file ~ 5KB, and 1 .txt file ~1KB each day 2GB/6KB = 333K pair of files... Is this correct? 5yr of files would ...
by PM-TPI
Wed Jul 20, 2022 4:54 pm
Forum: General Discussion and Questions
Topic: what file system
Replies: 9
Views: 8446

Re: what file system

Damien's script returned... UnicodeError: FAT filesystem 0000 jump ff:ff:ff ♦Traceback (most recent call last): File "<stdin>", line 85, in <module> File "<stdin>", line 83, in main File "<stdin>", line 67, in decode_bootsec File "<stdin>", line 16, in decode_bootsec_fat UnicodeError: ♦> MicroPython...
by PM-TPI
Wed Jul 06, 2022 7:57 pm
Forum: ESP32 boards
Topic: Soft Reboot and SPI
Replies: 0
Views: 8723

Soft Reboot and SPI

# vspi = causes a reboot MPY: soft reboot boot SmartLOG Start power latched... tft backlight set... Initialize WiFi WiFi... Activated Initialize BLE Bluetooth... Activated Ambient Sensor... Activated # vspi = SPI(2, miso=Pin(19), mosi=Pin(23), sck=Pin(18)) causes..... E (41926) spi_master: spi_maste...
by PM-TPI
Thu Jun 30, 2022 3:09 pm
Forum: Programs, Libraries and Tools
Topic: Initialize watchdog timer from function
Replies: 14
Views: 8185

Re: Initialize watchdog timer from function

from machine import WDT def start_up(): # This is run FIRST... init wifi ble etc global wdt other stuff.... wdt = WDT(timeout=120_000) # 2min def run_ing(): # This is run AFTER start_up and is run every min. global wdt wdt.feed() other stuff.... wdt.feed() is in... run_ing() not start_up()
by PM-TPI
Thu Jun 30, 2022 11:34 am
Forum: Programs, Libraries and Tools
Topic: Initialize watchdog timer from function
Replies: 14
Views: 8185

Re: Initialize watchdog timer from function

PM-TPI wrote:
Wed Jun 29, 2022 8:36 am
Note: start_up() is run before run_ing()
isn't the order...
a) wdt = WDT(timeout=120_000) to Initialize
then..
b) wdt.feed

Or do I have this backwards ?
by PM-TPI
Wed Jun 29, 2022 8:36 am
Forum: Programs, Libraries and Tools
Topic: Initialize watchdog timer from function
Replies: 14
Views: 8185

Re: Initialize watchdog timer from function

The only thing wrong with your above code is that you can't `feed()` the WDT until it has been initialized. So just change the feed line to: I thought... wdt = WDT(timeout=120_000) in start_up() did the initializing Note: start_up() is run before run_ing() 1st... I just changet wdt = 0 to wdt = Non...
by PM-TPI
Wed Jun 29, 2022 12:49 am
Forum: Programs, Libraries and Tools
Topic: Initialize watchdog timer from function
Replies: 14
Views: 8185

Re: Initialize watchdog timer from function

are you saying from machine import WDT wdt = 0 def start_up(): global wdt other stuff.... wdt = WDT(timeout=120_000) # 2min def run_ing(): # this is hit every min global wdt wdt.feed() other stuff.... AttributeError: 'int' object has no attribute 'feed' only on 1st go around, then seems to work what...
by PM-TPI
Wed Jun 29, 2022 12:12 am
Forum: Programs, Libraries and Tools
Topic: Initialize watchdog timer from function
Replies: 14
Views: 8185

Re: Initialize watchdog timer from function

I do have... from machine import WDT

Code: Select all

from machine import WDT

def start_up():
	global wdt
	other stuff....
	
	wdt = WDT(timeout=120_000) # 2min

def run_ing():	# this is hit every min
	global wdt
	wdt.feed()
	other stuff....

rather not use global either