Search found 360 matches

by scruss
Wed Sep 21, 2022 11:02 pm
Forum: Raspberry Pi microcontroller boards
Topic: Correct use of "time.ticks_diff(ticks1, ticks2)"..?
Replies: 4
Views: 29385

Re: Correct use of "time.ticks_diff(ticks1, ticks2)"..?

My aim is to have the 'other code processing time' be part of the 2 second pause... E.g. 1.8 + 200 ms = 2 seconds not 2 Sec + 200 ms... And that's exactly what you're getting. Put this at the end of your code: print('Elapsed / ms:', time.ticks_diff(time.ticks_ms(), start)) and you'll see this resul...
by scruss
Wed Sep 21, 2022 3:16 pm
Forum: Raspberry Pi microcontroller boards
Topic: Correct use of "time.ticks_diff(ticks1, ticks2)"..?
Replies: 4
Views: 29385

Re: Correct use of "time.ticks_diff(ticks1, ticks2)"..?

You're creating so much output that the terminal (Thonny?) takes time to catch up. Your loop is running for two seconds, but takes nearly a minute to output all of the data. Don't print so much. Use a small sleep, too: import time start = time.ticks_ms() while time.ticks_diff(time.ticks_ms(), start)...
by scruss
Mon Sep 12, 2022 12:15 am
Forum: Programs, Libraries and Tools
Topic: Access to OneDrive
Replies: 1
Views: 22022

Re: Access to OneDrive

asking the same question three times isn't going to get you an answer.

jimmo gave you an answer here: API for Microsoft OneDrive - MicroPython Forum (Archive).

Otherwise OneDrive is too large a system to talk to MicroPython. You'll need a separate server
by scruss
Thu Sep 08, 2022 4:19 pm
Forum: ESP32 boards
Topic: Stumping TypeError-appreciate help...
Replies: 6
Views: 25250

Re: Stumping TypeError-appreciate help...

JDRBoston wrote:
Thu Sep 08, 2022 3:02 pm
I’ll try flashing v1.18 ...
Better to use 1.19.1, as it is current and fixes some ESP32-specific problems.
by scruss
Wed Sep 07, 2022 7:38 pm
Forum: ESP32 boards
Topic: Stumping TypeError-appreciate help...
Replies: 6
Views: 25250

Re: Stumping TypeError-appreciate help...

Please post the line that has the error. We can't guess what you've written. Most likely you've done something like this: val = 10.0 print("val is " + val) This results in the same TypeError: can't convert 'float' object to str implicitly error. Note that either of these following examples is fine: ...
by scruss
Wed Aug 31, 2022 4:45 pm
Forum: General Discussion and Questions
Topic: problem with w2812b
Replies: 1
Views: 21389

Re: problem with w2812b

Spikey1973 wrote:
Wed Aug 31, 2022 2:01 pm
... the micropython based circuit python.
It's probably best to ask on Adafruit's CircuitPython support forum, as the syntax and libraries are somewhat different to regular MicroPython.

Also, this forum is going away soon, so not many people are looking at it
by scruss
Tue Aug 30, 2022 2:07 pm
Forum: General Discussion and Questions
Topic: Migration Away from MicroPython.org to GitHub?
Replies: 7
Views: 34199

Re: Migration Away from MicroPython.org to GitHub?

There's an existing thread here: Migration to GitHub Discussions

Github's ``` (triple backtick) notation for included code is okay once you get used to it.
by scruss
Sat Aug 27, 2022 4:13 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W not working, even though it was
Replies: 4
Views: 28406

Re: Pico W not working, even though it was

Default frequency is around 400000. The actual frequency is all down to the CPU's clock dividers, and I typically see 399361 as the default. You can find this out for yourself for your own board by entering the following in the REPL: import machine i=machine.I2C(1) i I2C(1, freq=399361, scl=7, sda=6)
by scruss
Sat Aug 27, 2022 4:09 pm
Forum: Announcements and News
Topic: Migration to GitHub Discussions
Replies: 20
Views: 174643

Re: Migration to GitHub Discussions

Only immediate issue for me is that Discussions has the same favicon as Github, so I can't easily tell if a tab is a github thing (with the octocat favicon) or a MicroPython thing (used to have an "M" favicon, now yet another octocat favicon) That's true... haha there must be a browser extension fo...
by scruss
Fri Aug 26, 2022 1:38 am
Forum: Programs, Libraries and Tools
Topic: New module to parse MIDI files available
Replies: 5
Views: 29514

Re: New module to parse MIDI files available

I got it to make noise! Glorious dreadful noise!
MicroPython MIDI mayhem (kinda)