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.
Search found 10 matches
- Mon Jun 21, 2021 6:04 am
- Forum: General Discussion and Questions
- Topic: UDP boardcast can Not be received
- Replies: 10
- Views: 8198
- Fri Jun 18, 2021 7:01 pm
- Forum: General Discussion and Questions
- Topic: UDP boardcast can Not be received
- Replies: 10
- Views: 8198
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...
- Mon May 31, 2021 8:38 am
- Forum: Raspberry Pi microcontroller boards
- Topic: How to read Map() function in micropython?
- Replies: 11
- Views: 26475
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 the op, reminds me of the map function from Parallax BASIC for
their Stamp controllers.
-Rusty-
- Fri May 28, 2021 10:02 am
- Forum: Raspberry Pi microcontroller boards
- Topic: How to read Map() function in micropython?
- Replies: 11
- Views: 26475
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 ...
- Sat May 09, 2020 8:43 am
- Forum: General Discussion and Questions
- Topic: DS18x20 -> ds.convert_temp() Question
- Replies: 2
- Views: 2489
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.
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.
- Thu Jan 17, 2019 11:55 pm
- Forum: Announcements and News
- Topic: MicroPython in Casio's graphic calculator
- Replies: 1
- Views: 53656
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. ...
- 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...
- Thu Feb 18, 2016 7:25 am
- Forum: WiPy and CC3200 boards
- Topic: Ad-hoc mode?
- Replies: 1
- Views: 2733
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...
- Wed Jan 13, 2016 7:38 pm
- Forum: MicroPython pyboard
- Topic: New build seems to have killed my Pyboard (now fixed)
- Replies: 23
- Views: 17854
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 ...
- Sun Nov 01, 2015 12:35 am
- Forum: WiPy and CC3200 boards
- Topic: Next batch of WiPy's?
- Replies: 4
- Views: 6618
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-
Is there an ETA for the next batch?
Also, is there a North American distributor?
Thanks!!
-Rusty-