This announcement is for a pre-release that I would like people to
comment on structure, naming, etc. (Code review maybe not yet. :-)
Before you say "It's all been done before." I suggest you take a closer
look and I think you may conclude that what I've revised over 7 years is
now interesting
On 13.11.2019 21:20, R.Wieser wrote:
300us is getting on towards realtime.
Not really. Translated to a frequency (toggeling the pin) it would be just
1.6 KHz. Thats rather slow for an ARM machine running on 1.4 Ghz (about a
million times as fast).
It *is* real-time...
Real-time is not about
>
>
> When I define the X and Y values for prediction in the train and test
> data, should I capture all the columns that has been "OneHotEncoded" (that
> is all columns with 0 and 1) for the X and Y values???
>
You might have better luck asking on Stackoverflow, per the Pandas
instructions: https
On 13.11.2019 23:20, Dennis Lee Bieber wrote:
For Windows it may require coding a busy-wait sleep function using the
high-performance counter and computing a counter value (modulo?) on which
to exit the loop.
time.perf_counter() is using this on Windows. I'm just worried about
floating point lim
Luciano,
> Mr. Wieser, I haven't seen you mention which library you're using
> to write to GPIO with Python.
To be honest, I took a "blink.py" example as a base, and just went with it.
So, I had to look it up. Its the first one you mentioned, RPi.GPIO.
Thanks for telling me about WiringPi's be
On 11/13/2019 9:02 AM, R.Wieser wrote:
I'm writing some code to toggle a pin on a Raspberry Pi, and would like to
have that happen at (multiples of) 300 uSec increments.
If you were looking at increments of multiple milleseconds, such as 1/60
== 16.6..., I would suggest using tkinter's root.a
Dietmar,
> Actually, with such requirements you're usually better off with a
> microcontroller.
Probably, yes. /Anything/ is better than a multi process mini 'puter for
tasks like these. Doesn't mean I'm not going to try though.
But honestly, generating a "modulated" 1.6 KHz square-wave sign
David,
> The general simplified idea was run it whenever the time is 0 modulo
> your interval. So you ask how long until that next time.
Ah, using the perf_counter() as its own reference (no "last time fired"
storage needed).
Thanks for the explanation.
Regards,
Rudy Wieser
--
https://mail.
Rob,
> 300us is getting on towards realtime.
Not really. Translated to a frequency (toggeling the pin) it would be just
1.6 KHz. Thats rather slow for an ARM machine running on 1.4 Ghz (about a
million times as fast).
> I've never tried it that fast.
I've already got it running it using th
Mr. Wieser, I haven't seen you mention which library you're using to
write to GPIO with Python. I know of two options:
1) RPi.GPIO: https://sourceforge.net/projects/raspberry-gpio-python/
-- the more popular option
2) WiringPy: https://github.com/WiringPi/WiringPi-Python -- an
alternative with bet
I just used .perf_counter() as it's "a clock with the highest available
resolution to measure a short duration"
The general simplified idea was run it whenever the time is 0 modulo your
interval. So you ask how long until that next time.
Run whenever the time is 0 modulo .0003
Current time is
On 13.11.2019 19:21, R.Wieser wrote:
Yup. But the cost of using that command is generating threads - which
some
search results warned against (not sure why though).
I'm currently looking for a way to have short breaks (in the range of
10us to some ms) on Windows and time.sleep() always seems
On 11/13/19 6:02 AM, R.Wieser wrote:
Hello all,
I'm writing some code to toggle a pin on a Raspberry Pi, and would like to
have that happen at (multiples of) 300 uSec increments.
I tried time.sleep(), but that one disregards the time after the last one
ends and the new one is started. In other
Dennis,
> So... you need to adjust for the time spent in processing between
> calls to sleep().
That was my first thought too, but any code calculating that adjustment
before ultimatily calling sleep itself can also be interrupted.With that
in mind I was aiming/hoping for something with a /
David,
> timeInterval = 0.0003
> time.sleep(timeInterval - (time.perf_counter() % timeInterval))
Possibly: any reason for the performance counter modulo the interval ?
Regards,
Rudy Wieser
--
https://mail.python.org/mailman/listinfo/python-list
Maybe something along the lines of this?
timeInterval = 0.0003
time.sleep(timeInterval - (time.perf_counter() % timeInterval))
-Original Message-
From: Python-list On
Behalf Of R.Wieser
Sent: Wednesday, November 13, 2019 11:12 AM
To: python-list@python.org
Subject: Re: How to delay un
Skip,
> Take a look at threading.Timer.
Thanks. It seems to solve the problem by calling it at the start of the
executed code (instead of the end), but costs thread usage ...
Regards,
Rudy Wieser
--
https://mail.python.org/mailman/listinfo/python-list
> So, I'm looking for a method that will allow me to wait for a "last time
> plus increment". Is there one with the properties of sleep() (not just
> burning processor cycles way, blocking all threads), but referencing a
> previous time.
Take a look at threading.Timer.
Skip
--
https://mail.pyth
Hello all,
I'm writing some code to toggle a pin on a Raspberry Pi, and would like to
have that happen at (multiples of) 300 uSec increments.
I tried time.sleep(), but that one disregards the time after the last one
ends and the new one is started. In other words, all the time spend in code
(
19 matches
Mail list logo