24 karma · joined Mar 15, 2016 (10y ago) · 82 submissions
comment 1w ago · link · parent
// // IR transmit // Project started 10/12/2026 // written by Larry Bank // // Nano C6 IR LED on GPIO3 #define IR_LED 3 #define MARK 1 #define SPACE 0 // // Send pulse // void SendPulse(int iCount, int iType) { ledcWrite(IR_LED, (iType == MARK) ? 128 : 0); // 50% duty cycle when the signal is "on" delayMicroseconds(562 * iCount); // continue this mark or space for N 562.5us periods } /* SendPulse() / // // Transmit a 32-bit NEC IR code // void SendCode(uint32_t code) { SendPulse(12, MARK); // start Mark SendPulse(6, SPACE); // start space // 562 on, 562 off = logical 0 // 562 on, 1687 off = logical 1 for (int iBit=0; iBit < 32; iBit++) { SendPulse(1, MARK); // 562.5us mark SendPulse((code & 0x80000000) ? 1 : 3, SPACE); // 562.5 or 1687.5us space for 1 or 0 code <<= 1; } SendPulse(1, MARK); // end of code SendPulse(1, SPACE); // turn off the LED } / SendCode() */
void setup() { pinMode(IR_LED, OUTPUT); ledcAttach(IR_LED, 38000, 8); ledcWrite(IR_LED, 0); // start with it off
while (1) {
SendCode(0xc03fe01f);
delay(1000);
}
}void loop() { }
5.
Fast GPIO on Linux(bitbanksoftware.blogspot.com ↗)
3 points · by bitbank · 1mo ago · discuss
7.
A Friendlier Version of I2cdetect(github.com ↗)
2 points · by bitbank · 1mo ago · 1 comment
9.
ESP32-P4 SIMD Explained(bitbanksoftware.blogspot.com ↗)
5 points · by bitbank · 7mo ago · 1 comment
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 2y ago · link · parent