Search found 10 matches

by fe2o3
Mon Jun 21, 2021 6:04 am
Forum: General Discussion and Questions
Topic: UDP boardcast can Not be received
Replies: 10
Views: 8078

Re: UDP boardcast can Not be received

Both code segments work for me although my PC is running Linux.
(Still not understanding the '<broadcast>' string)

Your hotspot may not be passing UDP broadcasts.
by fe2o3
Fri Jun 18, 2021 7:01 pm
Forum: General Discussion and Questions
Topic: UDP boardcast can Not be received
Replies: 10
Views: 8078

Re: UDP boardcast can Not be received

I thought I had posted this but... For receiving broadcasts, change your variable 'local_ip' in the client to either '0.0.0.0', which will permit broadcasts to be received on any IP address of the host or set it to the broadcast address for the network the broadcast is sent. For example, if your hos...
by fe2o3
Mon May 31, 2021 8:38 am
Forum: Raspberry Pi microcontroller boards
Topic: How to read Map() function in micropython?
Replies: 11
Views: 26380

Re: How to read Map() function in micropython?

I'd probably just rename map() to rescale(). The map(), as described
by the op, reminds me of the map function from Parallax BASIC for
their Stamp controllers.

-Rusty-
by fe2o3
Fri May 28, 2021 10:02 am
Forum: Raspberry Pi microcontroller boards
Topic: How to read Map() function in micropython?
Replies: 11
Views: 26380

Re: How to read Map() function in micropython?

It's really just simple math. def map(val, loval, hival, tolow, tohigh): if loval <= val <= hival: return (val - loval)/(hival-loval)*(tohigh-tolow) + tolow else: raise(ValueError) You will NEED to verify that (loval < hival) and that (tolow < tohigh) and return the result in the form you want (int ...
by fe2o3
Sat May 09, 2020 8:43 am
Forum: General Discussion and Questions
Topic: DS18x20 -> ds.convert_temp() Question
Replies: 2
Views: 2478

Re: DS18x20 -> ds.convert_temp() Question

That's fine. convert_temp() is for when there is only ONE 1-wire temperature device
on the bus. Notice the SKIP_ROM command? It doesn't address any particular device.
Using it when there are multiple devices will cause some confusion.
by fe2o3
Thu Jan 17, 2019 11:55 pm
Forum: Announcements and News
Topic: MicroPython in Casio's graphic calculator
Replies: 1
Views: 51955

Re: MicroPython in Casio's graphic calculator

I bought this calculator last week. No need to look for the "snake" on the package because you can upgrade an older fx-CG50's OS to the latest which includes μPy. There are only two packages you can import: math and random. That's it. There is no sys, machine, uos, or anything other useful modules. ...
by fe2o3
Sat Feb 27, 2016 6:14 am
Forum: Development of MicroPython
Topic: Obscenely long variable names
Replies: 1
Views: 2576

Obscenely long variable names

No, I don't use variables names like this but I was testing a thought. MicroPython v1.6 on 2016-02-01; PYBv1.0 with STM32F405RG Type "help()" for more information. >>> AReallyLongVariableNameThatIsNotAllThatUseful = 42 >>> dir() ['c', 'AReallyLongVariableNameThatIsNotAllThatUseful', '__name__', 'mac...
by fe2o3
Thu Feb 18, 2016 7:25 am
Forum: WiPy and CC3200 boards
Topic: Ad-hoc mode?
Replies: 1
Views: 2729

Ad-hoc mode?

Correct me if I'm wrong but, after reading some of the documentation because I'm still waiting for my little buggers to arrive :o , it appears that the WiPy is either acting as an Access Point or a station to such. Thusly, there is no ad-hoc mode available?? Sadly, I wanted to do a little meshing ar...
by fe2o3
Wed Jan 13, 2016 7:38 pm
Forum: MicroPython pyboard
Topic: New build seems to have killed my Pyboard (now fixed)
Replies: 23
Views: 17795

Re: WARNING New build seems to have killed my Pyboard

I believe that's the version I flashed my v1.0 board with last night. No problems and did it from my Raspberry Pi for the first time. Someone correct me if I'm wrong but I thought when flash goes beyond its "expiration" writes/erases that it simply doesn't write/erase -- reading only the last thing ...
by fe2o3
Sun Nov 01, 2015 12:35 am
Forum: WiPy and CC3200 boards
Topic: Next batch of WiPy's?
Replies: 4
Views: 6608

Next batch of WiPy's?

The shop has them marked "out of stock".
Is there an ETA for the next batch?

Also, is there a North American distributor?

Thanks!!
-Rusty-