Search found 50 matches
- Fri Nov 11, 2022 11:06 am
- Forum: Programs, Libraries and Tools
- Topic: Password Generator Using by Python Script
- Replies: 4
- Views: 32014
Re: Password Generator Using by Python Script
#!/usr/bin/python3 import random dataset = [] dataset.extend([chr(x) for x in range(ord('0'),ord('9')+1)]) dataset.extend([chr(x) for x in range(ord('A'),ord('Z')+1)]) dataset.extend([chr(x) for x in range(ord('a'),ord('z')+1)]) pw = ''.join([dataset[random.randrange(0,len(dataset))] for _ in range...
- Mon Sep 05, 2022 3:06 pm
- Forum: Programs, Libraries and Tools
- Topic: Can I read enviromenz variables?
- Replies: 3
- Views: 29312
- Sat Aug 27, 2022 4:31 pm
- Forum: Announcements and News
- Topic: Migration to GitHub Discussions
- Replies: 20
- Views: 200249
Re: Migration to GitHub Discussions
I just had a look at the GitHub Discussions. Probably OK on a PC with a large screen, but the postings bit is on the a panel in the middle of the screen, with equal screen estate being given to a left panel showing the topic sections and a right panel showing some voting stuff. Only a third of the ...
- Wed Aug 24, 2022 1:59 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: @rp2.asm_pio()
- Replies: 8
- Views: 37992
Re: @rp2.asm_pio()
Yeah, I have to admit, it was a bit cryptic.
Food for thought, helps the discovery and learning process …
- Wed Aug 24, 2022 1:32 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: @rp2.asm_pio()
- Replies: 8
- Views: 37992
Re: @rp2.asm_pio()
Code: Select all
import rp2
@rp2.asm_pio()
def whatever():
print('Cough … decorator.')
print('Cough … closure.')
- Mon Aug 22, 2022 4:06 pm
- Forum: General Discussion and Questions
- Topic: Protest against the registration verification !
- Replies: 8
- Views: 11731
Re: Protest against the registration verification !
Now that sir, that is a bold statement if I've ever heard one during my decades in the business.
- Mon Aug 22, 2022 7:52 am
- Forum: General Discussion and Questions
- Topic: Protest against the registration verification !
- Replies: 8
- Views: 11731
Re: Protest against the registration verification !
My eyesight isn't the best either, but whenever I need to decipher something to tiny I use ›xzoom‹.
If I'm not entirely wrong (and it's a very long time since I touched that) even Windows has something like ›zoom‹
Just a hint…
If I'm not entirely wrong (and it's a very long time since I touched that) even Windows has something like ›zoom‹
Just a hint…
- Fri Aug 19, 2022 8:47 am
- Forum: Raspberry Pi microcontroller boards
- Topic: How to load 32 bit constant from assembler with @micropython.asm_thumb
- Replies: 6
- Views: 25100
Re: How to load 32 bit constant from assembler with @micropython.asm_thumb
data(4, 0x1b8d72e4) # r5 = 0b00011011100011010111001011100100, the state table in 32 bits There was a bug that prevented values > 2**30 in the data(4, ...) instruction that was recently removed. Must be very recently. Unless you can do a data(4, 0xffffffff), then it's not usable for values > 0x3fff...
- Fri Aug 19, 2022 8:02 am
- Forum: Raspberry Pi microcontroller boards
- Topic: How to load 32 bit constant from assembler with @micropython.asm_thumb
- Replies: 6
- Views: 25100
Re: How to load 32 bit constant from assembler with @micropython.asm_thumb
Maybe this can be helpful. It builds a table using data entries which can be loaded later-on: #!/usr/bin/python3 import micropython from time import sleep_ms @micropython.asm_thumb def test_asm() -> uint: align (4) # DO NOT MODIFY mov (r7, pc) # PC points to the table, so does r7 now b (func_entry) ...
- Wed Aug 17, 2022 7:48 am
- Forum: Raspberry Pi microcontroller boards
- Topic: help please class error
- Replies: 13
- Views: 17553
Re: help please class error
Maybe that's what you're looking for… class IntegrateSensor: def __init__(self, scl, sda): self.i2c = SoftI2C(scl=scl, sda=sda) self.ahtx = AHT10(self.i2c) self.ahtx.sensor_init() self.bh = BH1750(self.i2c) def get_humidity(self): return int(self.ahtx.read_humidity()) def get_temperature(self): retu...