Skip to content

Commit

Permalink
clock freq and flash size printed in MHz and kB
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-fryza committed Nov 26, 2024
1 parent a3eb002 commit 6397838
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,14 @@ Test some other useful commands from [Quick reference for the ESP32](https://doc
# Get the current frequency of the CPU and RTC time
>>> import machine
>>> help(machine)
>>> machine.freq()
>>> freq = machine.freq()
>>> print(f"Machine clock frequency: {freq/1000:,} MHz")
>>> machine.RTC().datetime()
# Get Flash size in Bytes
>>> import esp
>>> esp.flash_size()
>>> print(f"Flash size: {esp.flash_size()/1000:,} kB")
# Read the internal temperature (in Fahrenheit)
>>> import esp32
Expand Down
4 changes: 3 additions & 1 deletion lab1-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@
# Get the current frequency of the CPU and RTC time
>>> import machine
>>> help(machine)
>>> machine.freq()
>>> freq = machine.freq()
>>> print(f"Machine clock frequency: {freq/1000:,} MHz")
>>> machine.RTC().datetime()

# Get Flash size in Bytes
>>> import esp
>>> esp.flash_size()
>>> print(f"Flash size: {esp.flash_size()/1000:,} kB")

# Read the internal temperature (in Fahrenheit)
>>> import esp32
Expand Down

0 comments on commit 6397838

Please sign in to comment.