No problem. The one I used is an ESP32 DevKitC, and you can find info about it on Espressif’s site, or just google the pinout diagram. For basic tasks it should be all you need since it has lots of binary pins, two ADC channels, two DAC channels, realtime clock, special pins for waking it from deep sleep, two I2C, etc. Though if you want to do video input you probably want something else, I’m learning.
Anyway, if you can spare the money to get one just to toy with I’d definitely recommend it.
Okay so that is an issue with the ESP32, sure. There are a lot of variants.
So from what I can tell, the ESP32 is the SoC chip and what you usually get is a dev board which has that plus a bunch of power regulation bits, a USB connector and UART so you can easily program it, etc. That part varies mostly by pinout. I.e. Same features, different pin location.
There are also variants of the chip, but those are usually more costly and will be named things like ESP32-S2.
Every one I’ve seen can run off 5v or 3.3v and uses the latter for logic, so if you got yourself an arduino kit and then just bought an ESP32 dev board it would almost certainly work with whatever is in the kit. Both are microcontrollers, not microprocessors, so they tend not to have OSes or screens.
When you put mail in the box, unless it’s a REALLY small bit of mail it’ll land so it obscures at least one of the proximity sensors. This then sets the ‘got mail’ statue to ‘on’ in Home Assistant. From there, I have HA set up to send me notifications to go and check the mail.
Before you say so, yes this was a lot of work for something so trivial, but it was fun. Plus I actually get so little physical mail that I can forget to check the mailbox for weeks at a time. Which would be very bad if I got some actually important mail. And actually, that exact thing happened just days after I finished installing the thing. So it has already potentially saved me from a fine.
I’m sorry to say I don’t. :/ You can grab dev boards off aliexpress for cheap, and they’re really easy to play with. Just connect the to your PC via USB to load your initial ESPHome script, and they spring to life. From there you can do basic testing, since they’ll get power from the USB. It’s just a matter of what you decide you want to hook up to them after that. I assume you’re looking for like a hobby kit, like you can get for arduino boards? Something that comes with a bunch of LEDs and I2C components you can fiddle with? Unfortunately I don’t know of any that come with ESP32 dev boards, but I’ll admit I’ve not looked. Sorry.
Here’s the code I wrote:
#include "Keyboard.h"
const char FUNCTION_F14 = 0xF1;
int down = 0;
void setup() {
// make pin 2 an input and turn on the
// pullup resistor so it goes high unless
// connected to ground:
pinMode(2, INPUT_PULLUP);
// initialize control over the keyboard:
Keyboard.begin();
}
void loop() {
int nowDown = digitalRead(2) == LOW;
if (down != nowDown) {
down = nowDown;
if (down) {
Keyboard.press(FUNCTION_F14);
} else {
Keyboard.release(FUNCTION_F14);
}
}
}
Note that the #include was meant to use angle brackets, but Lemmy ate them. If this doesn’t work, change it back to angle brackets around the Keyboard.h instead of quotes.
Also, the parts I used:
I wired it up like in the photo, and just laid it on a bed of hot glue so the USB port sticks out the hole. I had intended to get a mini USB extension cable inside the pedal, but the one I ordered turned up defective, and this worked out just fine.
I bought an existing foot pedal off aliexpress. It came with a little dangling wire, supposedly meant to be hooked up to a piece of industrial equipment. Opened it up, removed the existing wire, soldered a wire to a suitable arduino dev board and hot glued it inside. If you want I can dig up the exact parts I used and even the code. But I also suspect maybe you want to figure it out yourself?
MS SQL Server has this thing called Replication. It’s a feature to keep tables in sync between databases, and even database servers. There’s merge replication (two way), snapshot replication (one way scheduled publishing), and transaction replication (one way live-ish publishing).
And the logic is all implemented in T-SQL stored procedures.
I fucking hate it.
Circular references can also impede garbage collection, don’t forget.
And to further clarify, a proper object wrapping a resource like the ones you listed will release them when it is eventually collected, in the finalizer/destructor. However, you can’t know when that will happen, so we have IDisposable.Dispose() which can be used to release whatever critical resources the object is holding right away. :)
Okay that is a bit rougher. Best of luck I suppose. Hopefully you can lean on your colleagues somewhat. If I had one piece of advice, look up the using block, it basically ensures an object gets disposed immediately when it goes out of scope, which is the closest C# lets you get to deallocating memory. The object needs to implement IDisposable tho.
If you can code in C++ you should be able to muddle through in C# no problem. The runtime will help prevent the worst SNAFUs; y’know, pointer errors (there are none, unless you use the unsafe block or p/invoke), memory leaks etc. Just look at the existing code and cargo-cult it til you make it. You got this. :)
/usr/bin/joe mama