I didn’t see the ch32 firmware in the repository - the ch32v003 only has 1 i2c peripheral - assume you are bit-banging the others?
208 karma · joined November 10, 2013
I didn’t see the ch32 firmware in the repository - the ch32v003 only has 1 i2c peripheral - assume you are bit-banging the others?
I have transitioned to using the Nordic NRF chips (nrf52840) for my hobby projects which are very well supported by embassy-nrf and have been a pleasure to use and have great (and stable) BLE support. You can also get really cheap boards from AliExpress (search for nrf-micro).
Temp (4.3.7) & Press (4.3.6) literally have their own sections in the datasheet.
[1] https://regforge.dev/bmp280_xai_grok-4-1-fast-non-reasoning_... [2] https://www.bosch-sensortec.com/media/boschsensortec/downloa...
[1] https://www.adafruit.com/product/2264 [2] https://pypi.org/project/pyftdi/ [3] https://learn.adafruit.com/circuitpython-on-any-computer-wit...
FreeBSD supports amd64 and aarch64 as Tier 1 platforms and a number of others (RiscV, PowerPC, Arm7) as Tier 2
[0] https://www.analog.com/en/resources/technical-articles/a-rev...
https://github.com/paulc/hcloud-freebsd
(Allows you to provision instances using either the hcloud utility/web uni with ssh key/user-data support)
Oracle Cloud have a very generous free-tier for the arm64 boxes and I'm running 2 x arm64 instances (2 CPU / 12GB RAM each) - been really reliable so far though I'm not doing that much on them.
from dnslib import DNSRecord,DNSError,QTYPE
ROOT_NS='198.41.0.4'
def find_cname(a,qtype,cname):
for r in a.rr:
if QTYPE[r.rtype] == qtype and r.rname == cname:
return str(r.rdata)
elif QTYPE[r.rtype] == 'CNAME' and r.rname == cname:
return find_cname(a,qtype,str(r.rdata))
return resolve(str(r.rdata),qtype,ROOT_NS)
def resolve(name,qtype='A',ns=ROOT_NS):
print(f"dig -r @{ns} {name} {qtype}")
q = DNSRecord.question(name,qtype)
a = DNSRecord.parse(q.send(ns))
if q.header.id != a.header.id:
raise DNSError('Response transaction id does not match query transaction id')
for r in a.rr:
if QTYPE[r.rtype] == qtype and r.rname == name:
return str(r.rdata)
elif QTYPE[r.rtype] == 'CNAME' and r.rname == name:
return find_cname(a,qtype,str(r.rdata))
for r in a.ar:
if QTYPE[r.rtype] == 'A':
return resolve(name,qtype,str(r.rdata))
for r in a.auth:
if QTYPE[r.rtype] == 'NS':
return resolve(name,qtype,resolve(str(r.rdata),'A',ROOT_NS))
raise ValueError("Cant resolve domain")
if __name__ == '__main__':
import sys
def get_arg(i,d):
try: return sys.argv[i]
except IndexError: return d
print(resolve(get_arg(1,"google.com"), get_arg(2,"A"), get_arg(3,ROOT_NS)))
Disclaimer: I am author of dnslib [https://github.com/paulc/dnslib]Edit: Better CNAME support
Key thing I learnt writing dnslib (which was originally to provide a DNS API for an application) is that DNS is actually a very dynamic protocol but the complexity of mainstream servers like BIND makes it hard to do a lot of the things that you can actually do. There are a lot of problems (in particular in the service discovery space) which can be solved much more easily using DNS rather than inventing something separate.
As an aside if you want an authoritative DNS server I would look at KnotDNS [1] - you can avoid all the zone file cruft and interact with it using a sensible API. If you want to write a dynamic DNS app I would look at @miekg’s excellent Go library [2]
“For example, in New York, the number of workers at the face of the tunnel can be up to four times the number of workers required in Germany or Austria for similar projects.”
(FreeBSD user since 2.0.5 - 1995)
Nim:
$ cat hello.nim
stdout.write("hello, world!\n")
Static (musl): $ nim --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc --passL:-static c -d:release hello.nim
$ ldd ./hello
not a dynamic executable
Execution Time: 0m0.002s (real)
Total Syscalls: 16
Unique Syscalls: 8
Size (KiB): 95K (78K stripped)
Dynamic (glibc): $ nim c -d:release hello.nim
$ ldd ./hello
linux-vdso.so.1 => (0x00007ffc994b6000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f7c88785000)
libc.so.6 => /lib64/libc.so.6 (0x00007f7c883b8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7c88989000)
Execution Time: 0m0.002s (real)
Total Syscalls: 42
Unique Syscalls: 13
Size (KiB): 91K (79K stripped)
Which I think is actually pretty reasonable for a high-level GC'd language.I just added a pull-request to allow the recipients flag to also be specified as a https:// or file:// URL - this is mostly useful to use the GitHub <user>.keys endpoint to grab user keys eg.
./age -a -r https://github.com/<user>.keys < secret
will encrypt using <user>'s GitHub SSH public keys.https://www.kickstarter.com/projects/pimoroni/32blit-retro-i...
Try using the e1000 network adapter emulation - Win10/Server 2016 work fine with this.
# test.ini
[host1]
ip = 1.2.3.4
[host2]
ip = 5.6.7.8
[host3]
ip = 9.10.11.12
# config.py
import configparser
c = configparser.ConfigParser()
c.read("test.ini")
ips = [ c[host]['ip'] for host in c.sections() ]