vault backup: 2026-07-11 16:59:05
This commit is contained in:
3
Notes/Electronics/3-Way and 4-Way Switches.md
Normal file
3
Notes/Electronics/3-Way and 4-Way Switches.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## References
|
||||
|
||||
- ![[4-way_switch_wiring 1.png]]
|
||||
16
Notes/Electronics/555 Timer Circuits.md
Normal file
16
Notes/Electronics/555 Timer Circuits.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2026-01-03 12:21
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The 555 timer is a common chip used in the construction of timer circuits.
|
||||
## Notes
|
||||
|
||||
|
||||
## References
|
||||
|
||||
- [555 Adjustable Delay on Off Timer Circuit : 8 Steps - Instructables](https://www.instructables.com/555-Adjustable-Delay-on-Off-Timer-Circuit)
|
||||
- [The 555 Timer IC Lecture](https://www.me.psu.edu/cimbala/me345/Lectures/The_555_Timer_IC.pdf)
|
||||
21
Notes/Electronics/ADS1115 ADC Module.md
Normal file
21
Notes/Electronics/ADS1115 ADC Module.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
created: 2025-07-23
|
||||
tags:
|
||||
- resource
|
||||
---
|
||||
## Summary
|
||||
|
||||
A 4 channel analogue to digital converter board.
|
||||
## Notes
|
||||
|
||||
There is a Rust crate for interfacing to the board. Requires calibration when based on the input signal. Default address for the board is 0x48 (see section 7.5.1.1 of the data sheet)
|
||||
## References
|
||||
|
||||
- [`ads1x1x` crate](https://crates.io/crates/ads1x1x)
|
||||
- [How to use ADS1115 16-Bit ADC Module with Raspberry Pi](https://how2electronics.com/how-to-use-ads1115-16-bit-adc-module-with-raspberry-pi)
|
||||
- [Amazon: ADS1115 Analog-to-Digital Converter 16 Bit ADC 4](https://www.amazon.com/Converter-Programmable-Amplifier-Development-Compatible/dp/B08QD2C42R)
|
||||
- https://www.ti.com/lit/ds/symlink/ads1115.pdf
|
||||
- [Using the second (I2C 0) port on a Raspberry Pi - YouTube](https://www.youtube.com/watch?v=FUAiELC76aw)
|
||||
- [Several I2C Devices, how to wire them? - Raspberry Pi Forums](https://forums.raspberrypi.com/viewtopic.php?t=371894)
|
||||
- [[Odin's Dilemma Human Chain Puzzle]]
|
||||
|
||||
10
Notes/Electronics/Arduino.md
Normal file
10
Notes/Electronics/Arduino.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## References
|
||||
|
||||
- [Ethernet - Arduino Reference](https://www.arduino.cc/reference/en/libraries/ethernet)
|
||||
- [A complete guide to running Rust on Arduino - LogRocket Blog](https://blog.logrocket.com/complete-guide-running-rust-arduino)
|
||||
- [Arduino - Turn LED ON and OFF With Button - The Robotics Back-End](https://roboticsbackend.com/arduino-turn-led-on-and-off-with-button)
|
||||
- https://github.com/avrdudes/avrdude
|
||||
- [Adding the #[no_std] attribute - The AVR-Rust Guidebook](https://book.avr-rust.org/005.2-adding-no-std-attribute.html)
|
||||
- [GitHub - osx-cross/homebrew-avr: Homebrew AVR Toolchain](https://github.com/osx-cross/homebrew-avr)
|
||||
- [A complete guide to running Rust on Arduino - LogRocket Blog](https://blog.logrocket.com/complete-guide-running-rust-arduino/)
|
||||
|
||||
15
Notes/Electronics/Best A3 Inkjet Printers.md
Normal file
15
Notes/Electronics/Best A3 Inkjet Printers.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-01-04 17:20
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
What's the best A3 Inkjet printer
|
||||
## References
|
||||
|
||||
- [A Paper Sizes - A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10](https://www.papersizes.org/a-paper-sizes.htm)
|
||||
- https://thedroidguy.com/best-printers-for-architects-1160434
|
||||
- [Epson P800 Vs Canon Pro 1000 | Best A2 Photo Printer](https://www.architecturelab.net/epson-p800-vs-canon-pro-1000-best-a2-photo-printer)
|
||||
- [🖨️ Best Printer for Art Prints: 14 Artists' Picks in 2025 (Budget, A3, Giclee, Fine Art)](https://artsideoflife.com/best-printer-art-prints)
|
||||
16
Notes/Electronics/Data Sheets.md
Normal file
16
Notes/Electronics/Data Sheets.md
Normal file
@@ -0,0 +1,16 @@
|
||||
## 4017B Chip
|
||||
|
||||
[cd4017b.pdf](cd4017b.pdf)
|
||||
|
||||
## LM555
|
||||
|
||||
[lm555.pdf](lm555.pdf)
|
||||
|
||||
## Arduino
|
||||
|
||||
[Arduino-Nano-Datasheet.pdf](Arduino-Nano-Datasheet.pdf.md)
|
||||
|
||||
## Potentiometers
|
||||
|
||||
[Preset Potentiometer (Trimpot).pdf](Preset%20Potentiometer%20(Trimpot).pdf)
|
||||
|
||||
18
Notes/Electronics/Debouncing Switch.md
Normal file
18
Notes/Electronics/Debouncing Switch.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-05-04 19:57
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
How to use hardware and software to debounce switches.
|
||||
## Notes
|
||||
|
||||
|
||||
|
||||
## References
|
||||
|
||||
- https://logiswitch.com/wp-content/uploads/LS10-Series-ICs-Technical-Details.pdf
|
||||
- https://www.digikey.com/en/products/detail/LS18-S/2978-LS18-S-ND/13540839
|
||||
- https://www.digikey.com/en/articles/how-to-implement-hardware-debounce-for-switches-and-relays
|
||||
38
Notes/Electronics/Differential Signalling.md
Normal file
38
Notes/Electronics/Differential Signalling.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2026-05-30 11:26
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
One channel is inverted in differential signaling to provide exceptional **noise immunity** and to **double the signal strength.**
|
||||
|
||||
In differential signaling, the data is transmitted across two separate conductors: one carries the original signal, and the other carries an inverted (mirror-image) copy. Here is why this is done:
|
||||
|
||||
1. Superior Noise Cancellation
|
||||
|
||||
External electrical interference (like electromagnetic noise from nearby wires or power supplies) usually affects both wires in a pair equally. This is known as **common-mode noise**.
|
||||
|
||||
- At the receiving end, a differential amplifier subtracts the two signals to determine the true data.
|
||||
- Because the noise exists equally on both wires, the subtraction mathematically cancels the noise out completely.
|
||||
|
||||
2. Doubled Signal Strength
|
||||
|
||||
When the receiver subtracts the inverted signal from the original signal, it yields double the voltage difference.
|
||||
|
||||
- For example, if the original signal is \(+1V), the inverted signal is \(-1V).
|
||||
- The voltage difference is: \(+1V - (-1V) = 2V).
|
||||
- This creates a stronger overall signal, making it much easier to detect data accurately even in noisy environments or over very long distances.
|
||||
|
||||
3. Reduced Electromagnetic Interference (EMI)
|
||||
|
||||
Because the two wires run tightly parallel to each other, the equal and opposite magnetic fields they generate cancel each other out. This prevents the cables from radiating their own electronic noise, allowing for high-speed transmission with minimal cross-talk.
|
||||
|
||||
The two differential wires are **twisted** so that any EMI signal reaches both wires at essentially the same time. This is referred to as a **twisted pair**.
|
||||
|
||||
Differential signalling does not affect noise cancellation. [Balanced lines](https://en.wikipedia.org/wiki/Balanced_line "Balanced line") with differential receivers will reject noise regardless of whether the signal is differential or single-ended, but since balanced line noise rejection *requires* a differential receiver, differential signalling is often used on balanced lines.
|
||||
## References
|
||||
|
||||
- [Why Twisted Pair?](https://www.youtube.com/watch?v=RVzM-b3okH0)
|
||||
- [Differential Signaling]()
|
||||
8
Notes/Electronics/Digital Oscilliscope.md
Normal file
8
Notes/Electronics/Digital Oscilliscope.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Digital Oscilliscope
|
||||
|
||||
[](https://www.siglenteu.com/operating-tip/adding-mso-logic-analyzer-capability-sds1004x-e-series-oscilloscopes/)
|
||||
|
||||
[](https://www.thegeekpub.com/243253/the-best-benchtop-power-supplies-for-hobbyists/)
|
||||
|
||||
[](https://www.calculator.net/voltage-drop-calculator.html)
|
||||
|
||||
4
Notes/Electronics/Electrical Connectors.md
Normal file
4
Notes/Electronics/Electrical Connectors.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Electrical Connectors
|
||||
|
||||
[Identify Electrical Connectors - Tutorial Australia](https://core-electronics.com.au/guides/identify-electrical-connectors/)
|
||||
|
||||
8
Notes/Electronics/Embedded Rust.md
Normal file
8
Notes/Electronics/Embedded Rust.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Embedded Rust
|
||||
|
||||
- [`awesome-embedded-rust` with lots of links to embedded Rust stuff](https://github.com/rust-embedded/awesome-embedded-rust)
|
||||
- [`rppal` that implements `embedded-hal` traits](https://docs.rs/rppal/latest/rppal/)
|
||||
- [`embedded-hal` traits](https://github.com/rust-embedded/embedded-hal)
|
||||
- [Example of using Rust to develop flashing LED](https://www.freecodecamp.org/news/embedded-rust-programming-on-raspberry-pi-zero-w/) (uses `rust_gpiozero` crate)
|
||||
- [Rust MFRC522 driver](https://gitlab.com/jspngh/rfid-rs) for RFID chip reading
|
||||
|
||||
48
Notes/Electronics/Eplzon DC 5V-36V 15A 400W MOSFET Module.md
Normal file
48
Notes/Electronics/Eplzon DC 5V-36V 15A 400W MOSFET Module.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-04-24 12:26
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Notes about the [EPLZON DC 5V-36V 15A 400W MOSFET Transistor Trigger Switch Drive Module](https://www.amazon.com/dp/B09LLR675M) available on Amazon.
|
||||
## Notes
|
||||
|
||||
The article [Dual MOSFET Switch Module – WORTH IT OR NOT? - Codrey Electronics][1] describes the board and it's strengths and shortcomings.
|
||||
|
||||
The circuit diagram is shown here:
|
||||
|
||||
![[Dual MOSFET Switch Module.png]]
|
||||
|
||||
The board has two [AOD4184A MOSFET's][2] in parallel.
|
||||
|
||||
Key points to note:
|
||||
|
||||
1. The switch is triggered from the J1 pin and grounded on the J4 pin
|
||||
2. Power flows through VIN+ to VOUT+ then is actually switched between VOUT- and VIN-
|
||||
3. Adding the [flyback diode][3] is important for solenoids to prolong the life of the switch
|
||||
4. It would be a good board to re-design our own version of to include the 2 resistors and the flyback diode that he mentions in the article
|
||||
|
||||
>If you use a standard MOSFET, a 3.3V gate signal won't open the "channel" completely. This causes the MOSFET to have a high R_DS(on), meaning it will heat up rapidly, limit the amount of current your load can draw, and potentially burn out.
|
||||
## References
|
||||
|
||||
- [Dual MOSFET Switch Module – WORTH IT OR NOT? - Codrey Electronics](https://www.codrey.com/electronics/dual-mosfet-switch-module)
|
||||
- [Driving Parallel MOSFETS](https://www.ti.com/lit/ab/slvaf39a/slvaf39a.pdf)
|
||||
- [Flyback diode - Wikipedia](https://en.wikipedia.org/wiki/Flyback_diode)
|
||||
- [MOSFET selection for 3.3VDC](https://forum.digikey.com/t/guide-to-selecting-and-controlling-a-mosfet-for-3-3-vdc-logic-applications/42606)
|
||||
- [AOD4184A datasheet](https://www.aosmd.com/sites/default/files/res/datasheets/AOD4184A.pdf)
|
||||
- [SIHLR024 datasheet](https://www.vishay.com/docs/91322/sihlr024.pdf)
|
||||
- [SiHLU024 DigiKey](https://www.digikey.com/en/products/detail/vishay-siliconix/sihlu024-ge3/16397615)
|
||||
- [FDN337N datasheet](https://www.onsemi.com/pdf/datasheet/fdn337n-d.pdf)
|
||||
- [AO3400 datasheet](https://www.aosmd.com/res/datasheets/AO3400.pdf)
|
||||
- [AO3400-202604 datasheet](https://www.goodworksemi.com/wp-content/uploads/2026/03/GK-SOT-23_AO3400-202604.pdf) <- current favorite
|
||||
- [IRLZ44NPbF datasheet ](https://www.infineon.com/assets/row/public/documents/24/49/infineon-irlz44n-datasheet-en.pdf) Through hole for better heat dissipation
|
||||
- [IRLML2502PbF](https://www.infineon.com/assets/row/public/documents/24/49/infineon-irlml2502-datasheet-en.pdf)
|
||||
- [MOSFET gate resistor](https://www.build-electronic-circuits.com/mosfet-gate-resistor/)
|
||||
- [YouTube - AO3040 board build](https://www.youtube.com/watch?v=9XFCOGmvo1E&t=230s)
|
||||
|
||||
We could increase the 3.3V input signal to 5V using an NPM transistor, as in this circuit:
|
||||
|
||||
![[Screenshot 2026-05-30 at 5.58.28 PM.png]]
|
||||
|
||||
446
Notes/Electronics/FPM10A Fingerprint Reader.md
Normal file
446
Notes/Electronics/FPM10A Fingerprint Reader.md
Normal file
@@ -0,0 +1,446 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2026-07-02 17:17
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
To interface the **FPM10A** (or AS608) fingerprint sensor with a Raspberry Pi in Rust, you use the **`rppal`** crate to communicate via UART. The sensor uses a byte-oriented packet protocol (prefixed with `0xEF 0x01` and a checksum). [[1](https://docs.rs/rppal/latest/rppal/uart/index.html), [2](https://users.rust-lang.org/t/good-gpio-crate-for-raspberry-pi-with-example-reading-code/104744), [3](https://www.scribd.com/document/418930331/FPM10-R305-Fingerprint-Sensor-Interfacin), [4](https://doc.grablo.co/en/docs/user-manuals/i-o-device/as608-fpm10a-fingerprint-sensor/), [5](https://docs.rs/rppal)]
|
||||
|
||||
1. Wiring the Sensor
|
||||
|
||||
The FPM10A uses standard TTL serial, so you need to shift to 3.3V logic for the Raspberry Pi. Connect the pins as follows: [[1](https://www.robotechbd.com/product/sensors/fpm10a-fingerprint-reader-module-3-3v-5v/?srsltid=AfmBOor0OAfLEf3pAxrEbpz1neXPG8k-dPymfhFZ0llotH9e4It2jZFJ), [2](https://forum.arduino.cc/t/fpm10a-fingerprint-sensor-question/490666)]
|
||||
|
||||
- **Sensor VCC** → Raspberry Pi **3.3V or 5V** (Sensor supports 3.6V - 6.0V, but the Pi's TX pin should be level-shifted if you power the sensor at 5V)
|
||||
- **Sensor GND** → Raspberry Pi **GND**
|
||||
- **Sensor TX** (White wire) → Raspberry Pi **GPIO15 / RXD**
|
||||
- **Sensor RX** (Green wire) → Raspberry Pi **GPIO14 / TXD** [[1](https://cdn.awsli.com.br/945/945993/arquivos/FPM10A-DY50.pdf), [2](https://www.duino.lk/product/fpm10a-fingerprint-reader-sensor-module-optical/?srsltid=AfmBOoq2IUprS8MVhONDDppy6MYp9jdws_0AJJ3jnk1tCjE7ZTJjCIAS), [3](https://embedgyan.wordpress.com/2020/06/21/guide-to-fingerprint-sensor-module-with-arduino-fpm10a/), [4](https://dronebridge.gitbook.io/docs/dronebridge-for-raspberry-pi/getting-started), [5](https://www.robotechbd.com/product/sensors/fpm10a-fingerprint-reader-module-3-3v-5v/?srsltid=AfmBOor0OAfLEf3pAxrEbpz1neXPG8k-dPymfhFZ0llotH9e4It2jZFJ)]
|
||||
|
||||
2. Rust Configuration
|
||||
|
||||
Add `rppal` to your `Cargo.toml` dependencies: [[1](https://crates.io/crates/rppal), [2](https://cdn.awsli.com.br/945/945993/arquivos/FPM10A-DY50.pdf)]
|
||||
|
||||
toml
|
||||
|
||||
```
|
||||
[dependencies]
|
||||
rppal = "0.22"
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
|
||||
Because the FPM10A defaults to a baud rate of **57600**, configure your `Uart` peripheral settings using `rppal::uart::Uart`: [[1](https://docs.rs/rppal/latest/rppal/uart/struct.Uart.html), [2](https://cdn.awsli.com.br/945/945993/arquivos/FPM10A-DY50.pdf), [3](https://doc.grablo.co/en/docs/user-manuals/i-o-device/as608-fpm10a-fingerprint-sensor/)]
|
||||
|
||||
rust
|
||||
|
||||
```
|
||||
use rppal::uart::{Uart, Parity};
|
||||
use std::time::Duration;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// 57600 is the default FPM10A baud rate.
|
||||
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
|
||||
|
||||
// Set read timeouts to prevent blocking indefinitely
|
||||
uart.set_read_mode(1, Duration::from_millis(500))?;
|
||||
|
||||
// Send your command packets here (e.g., Handshake, Get Image, Search)
|
||||
|
||||
Ok(())
|
||||
}
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
|
||||
3. FPM10A Protocol Basics
|
||||
|
||||
Because the FPM10A is a slave device, you must send command packets and parse the returned packets. A standard command follows this structure: [[1](https://www.youtube.com/watch?v=m6Vm32fOkUI), [2](https://www.aliexpress.com/item/1005009144306444.html)]
|
||||
|
||||
1. **Header**: `0xEF, 0x01`
|
||||
2. **Address**: `0xFF, 0xFF, 0xFF, 0xFF` (Default address)
|
||||
3. **Package Identifier**: `0x01` (Command Packet)
|
||||
4. **Package Length**: 2 bytes (Length = Length of remaining data + 2 for Checksum)
|
||||
5. **Instruction Code**: (e.g., `0x01` for Handshake, `0x0C` for Store)
|
||||
6. **Parameters**: Variable
|
||||
7. **Checksum**: 2 bytes (Sum of Package Identifier, Length, Instruction Code, and Parameters) [[1](https://forum.arduino.cc/t/fpm10a-library-problems/491794), [2](https://www.robotechbd.com/product/sensors/fpm10a-fingerprint-reader-module-3-3v-5v/?srsltid=AfmBOor0OAfLEf3pAxrEbpz1neXPG8k-dPymfhFZ0llotH9e4It2jZFJ)]
|
||||
|
||||
A handshake command would look like this:
|
||||
\(\text{Header (2)} + \text{Address (4)} + \text{ID (1)} + \text{Length (2)} + \text{Cmd (1)} + \text{Checksum (2)}\) [[1](https://www.scribd.com/document/418930331/FPM10-R305-Fingerprint-Sensor-Interfacin)]
|
||||
|
||||
Would you like to see a code implementation for a specific FPM10A command, or do you need help setting up your **Raspberry Pi OS UART configuration** (using `raspi-config`) before writing the code? [[1](https://crates.io/crates/rppal)]
|
||||
|
||||
Here is a complete, production-ready Rust example using `rppal` to **enroll (program)** a fingerprint and then **search (check)** for a match.
|
||||
|
||||
Implementation Strategy
|
||||
|
||||
The FPM10A requires a multi-step sequence for both operations:
|
||||
|
||||
- **Enrollment:** Capture image 1 → Generate character file 1 → Capture image 2 → Generate character file 2 → Combine templates → Store template to a specific ID slot.
|
||||
- **Searching:** Capture image → Generate character file → Search the database flash memory for a match.
|
||||
|
||||
Complete Rust Code
|
||||
|
||||
rust
|
||||
|
||||
```
|
||||
use rppal::uart::{Parity, Uart};
|
||||
use std::error::Error;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
|
||||
// --- FPM10A Configuration Constants ---
|
||||
const DEFAULT_ADDR: [u8; 4] = [0xFF, 0xFF, 0xFF, 0xFF];
|
||||
const PACKET_COMMAND: u8 = 0x01;
|
||||
|
||||
// --- FPM10A Instruction Codes ---
|
||||
const CMD_GETIMAGE: u8 = 0x01;
|
||||
const CMD_IMAGE2TZ: u8 = 0x02;
|
||||
const CMD_REGMODEL: u8 = 0x05;
|
||||
const CMD_STORE: u8 = 0x06;
|
||||
const CMD_SEARCH: u8 = 0x04;
|
||||
|
||||
// --- Error Helper ---
|
||||
fn handle_confirmation_code(code: u8) -> Result<(), String> {
|
||||
match code {
|
||||
0x00 => Ok(()),
|
||||
0x01 => Err("Error receiving packet".to_string()),
|
||||
0x02 => Err("No finger on sensor".to_string()),
|
||||
0x03 => Err("Failed to enroll finger".to_string()),
|
||||
0x0a => Err("Failed to combine character files".to_string()),
|
||||
0x0b => Err("Addressing ID is out of range".to_string()),
|
||||
0x1d => Err("Failed to operate flash memory".to_string()),
|
||||
_ => Err(format!("Unknown confirmation error: 0x{:02X}", code)),
|
||||
}
|
||||
}
|
||||
|
||||
// --- Protocol Packet Builder and Parser ---
|
||||
fn send_command(uart: &mut Uart, cmd: u8, params: &[u8]) -> Result<Vec<u8>, Box<dyn Error>> {
|
||||
let length = (params.len() + 3) as u16; // length = len(cmd + params + checksum)
|
||||
let len_high = (length >> 8) as u8;
|
||||
let len_low = (length & 0xFF) as u8;
|
||||
|
||||
// Calculate Checksum: sum of packet identifier, length bytes, command, and params
|
||||
let mut checksum: u32 = PACKET_COMMAND as u32 + len_high as u32 + len_low as u32 + cmd as u32;
|
||||
for &p in params {
|
||||
checksum += p as u32;
|
||||
}
|
||||
let sum_high = ((checksum >> 8) & 0xFF) as u8;
|
||||
let sum_low = (checksum & 0xFF) as u8;
|
||||
|
||||
// Build the frame
|
||||
let mut packet = vec![0xEF, 0x01]; // Header
|
||||
packet.extend_from_slice(&DEFAULT_ADDR);
|
||||
packet.push(PACKET_COMMAND);
|
||||
packet.push(len_high);
|
||||
packet.push(len_low);
|
||||
packet.push(cmd);
|
||||
packet.extend_from_slice(params);
|
||||
packet.push(sum_high);
|
||||
packet.push(sum_low);
|
||||
|
||||
// Flush and write
|
||||
uart.flush(rppal::uart::Queue::Both)?;
|
||||
uart.write(&packet)?;
|
||||
|
||||
// Read Response Frame Header (minimum response size is 12 bytes)
|
||||
let mut response = vec![0u8; 12 + params.len()];
|
||||
let bytes_read = uart.read(&mut response)?;
|
||||
|
||||
if bytes_read < 12 || response[0] != 0xEF || response[1] != 0x01 {
|
||||
return Err("Invalid response packet header from sensor".into());
|
||||
}
|
||||
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
// Helper to poll for a finger until one is placed on the glass
|
||||
fn wait_for_finger(uart: &mut Uart, prompt: &str) -> Result<(), Box<dyn Error>> {
|
||||
println!("{}", prompt);
|
||||
loop {
|
||||
if let Ok(resp) = send_command(uart, CMD_GETIMAGE, &[]) {
|
||||
if resp[9] == 0x00 { // Confirmation code is at index 9
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
sleep(Duration::from_millis(200));
|
||||
}
|
||||
}
|
||||
|
||||
/// Enrolls a new finger into the specified ID slot (e.g., 0 to 162)
|
||||
fn enroll_finger(uart: &mut Uart, id_slot: u16) -> Result<(), Box<dyn Error>> {
|
||||
// 1. First image capture
|
||||
wait_for_finger(uart, "Place your finger on the sensor...")?;
|
||||
send_command(uart, CMD_IMAGE2TZ, &[0x01])?; // Convert to character file buffer 1
|
||||
println!("First scan successful. Remove finger.");
|
||||
sleep(Duration::from_secs(2));
|
||||
|
||||
// 2. Second image capture
|
||||
wait_for_finger(uart, "Place the SAME finger on the sensor again...")?;
|
||||
send_command(uart, CMD_IMAGE2TZ, &[0x02])?; // Convert to character file buffer 2
|
||||
println!("Second scan successful.");
|
||||
|
||||
// 3. Combine buffers 1 and 2 into a reference model template
|
||||
println!("Creating model template...");
|
||||
let resp = send_command(uart, CMD_REGMODEL, &[])?;
|
||||
handle_confirmation_code(resp[9])?;
|
||||
|
||||
// 4. Store template in specified ID slot
|
||||
let id_high = (id_slot >> 8) as u8;
|
||||
let id_low = (id_slot & 0xFF) as u8;
|
||||
println!("Saving template to ID slot {}...", id_slot);
|
||||
let resp = send_command(uart, CMD_STORE, &[0x01, id_high, id_low])?;
|
||||
handle_confirmation_code(resp[9])?;
|
||||
|
||||
println!("Fingerprint successfully programmed to ID #{}!", id_slot);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Checks the sensor for a valid live finger and searches the internal database
|
||||
fn identify_finger(uart: &mut Uart) -> Result<(), Box<dyn Error>> {
|
||||
wait_for_finger(uart, "Place finger on the sensor to authenticate...")?;
|
||||
|
||||
// Convert live image to character buffer 1
|
||||
send_command(uart, CMD_IMAGE2TZ, &[0x01])?;
|
||||
|
||||
// Search database using buffer 1 (Params: buffer id, start index high/low, count high/low)
|
||||
println!("Searching fingerprint database...");
|
||||
let resp = send_command(uart, CMD_SEARCH, &[0x01, 0x00, 0x00, 0x00, 0xA3])?;
|
||||
|
||||
match handle_confirmation_code(resp[9]) {
|
||||
Ok(_) => {
|
||||
// Index 10-11: Found Page ID, Index 12-13: Match Score
|
||||
let match_id = ((resp[10] as u16) << 8) | (resp[11] as u16);
|
||||
let score = ((resp[12] as u16) << 8) | (resp[13] as u16);
|
||||
println!("✅ ACCESS GRANTED! Found Match ID: #{} with score: {}", match_id, score);
|
||||
}
|
||||
Err(_) => {
|
||||
println!("❌ ACCESS DENIED! Fingerprint not recognized.");
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
// Open system UART (typically /dev/ttyS0 or /dev/ttyAMA0 on Raspberry Pi)
|
||||
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
|
||||
uart.set_read_mode(1, Duration::from_millis(1000))?;
|
||||
|
||||
// Step 1: Program a fingerprint into slot #1
|
||||
enroll_finger(&mut uart, 1)?;
|
||||
|
||||
sleep(Duration::from_secs(2));
|
||||
|
||||
// Step 2: Loop checking for validation
|
||||
loop {
|
||||
if let Err(e) = identify_finger(&mut uart) {
|
||||
println!("Error during processing: {}. Retrying...", e);
|
||||
}
|
||||
sleep(Duration::from_secs(3));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
|
||||
Visual Map of the Search Packet Response
|
||||
|
||||
When decoding the response of the `CMD_SEARCH` (`0x04`) function payload, keep these indices in mind when working with the byte array:
|
||||
|
||||
text
|
||||
|
||||
```
|
||||
Response Byte Index:
|
||||
[0, 1] -> Header (0xEF, 0x01)
|
||||
[2..5] -> Device Address
|
||||
[6] -> Packet Identifier
|
||||
[7, 8] -> Packet Length
|
||||
[9] -> Confirmation Code (0x00 = Match Found)
|
||||
[10, 11] -> Found ID Slot (High byte, Low byte)
|
||||
[12, 13] -> Match Score (High byte, Low byte)
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
|
||||
Here is the code to delete fingerprints from the FPM10A's internal database.
|
||||
|
||||
The sensor uses the **DeleChar** instruction code (`0x0C`). It requires you to pass the starting memory slot ID and the number of consecutive templates you want to clear out.
|
||||
|
||||
Rust Implementation For Deletion
|
||||
|
||||
Add this function to your existing codebase. It includes two common use-case implementations: deleting a single target ID slot or wiping a sequential block of memory.
|
||||
|
||||
rust
|
||||
|
||||
```
|
||||
// --- Add this to your Instruction Codes constants ---
|
||||
const CMD_DELECHAR: u8 = 0x0C;
|
||||
|
||||
/// Deletes a specific number of fingerprints starting from a defined page ID slot.
|
||||
///
|
||||
/// * `uart` - Mutable reference to the initialized Rppal Uart peripheral.
|
||||
/// * `start_id` - The memory slot index where deletion begins (e.g., 1).
|
||||
/// * `count` - How many consecutive templates to wipe (use 1 to clear only the start_id).
|
||||
fn delete_fingerprints(uart: &mut Uart, start_id: u16, count: u16) -> Result<(), Box<dyn Error>> {
|
||||
let start_high = (start_id >> 8) as u8;
|
||||
let start_low = (start_id & 0xFF) as u8;
|
||||
let count_high = (count >> 8) as u8;
|
||||
let count_low = (count & 0xFF) as u8;
|
||||
|
||||
println!("Attempting to delete {} slots starting from ID #{}...", count, start_id);
|
||||
|
||||
// Params array format required by FPM10A: [PageID High, PageID Low, Number of templates High, Number of templates Low]
|
||||
let params = [start_high, start_low, count_high, count_low];
|
||||
|
||||
// Send command and wait for response packet
|
||||
let resp = send_command(uart, CMD_DELECHAR, ¶ms)?;
|
||||
|
||||
// Byte index 9 holds the confirmation status code
|
||||
match handle_confirmation_code(resp[9]) {
|
||||
Ok(_) => {
|
||||
println!("🗑️ Successfully deleted {} template(s) from memory!", count);
|
||||
Ok(())
|
||||
}
|
||||
Err(e) => {
|
||||
// Standard sensor error 0x15 means it failed to clear the slots (e.g., already empty)
|
||||
if resp[9] == 0x15 {
|
||||
return Err("Failed to delete templates. The requested slots might already be empty.".into());
|
||||
}
|
||||
Err(format!("Deletion failed: {}", e).into())
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
|
||||
How to use it in `main()`
|
||||
|
||||
You can call the function depending on whether you want to delete a specific user fingerprint or completely purge a range of data:
|
||||
|
||||
rust
|
||||
|
||||
```
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
|
||||
uart.set_read_mode(1, Duration::from_millis(1000))?;
|
||||
|
||||
// Use Case 1: Delete exactly one fingerprint stored at ID slot #5
|
||||
if let Err(e) = delete_fingerprints(&mut uart, 5, 1) {
|
||||
println!("Error: {}", e);
|
||||
}
|
||||
|
||||
// Use Case 2: Bulk delete slots 10 through 29 (20 slots total)
|
||||
// if let Err(e) = delete_fingerprints(&mut uart, 10, 20) {
|
||||
// println!("Error: {}", e);
|
||||
// }
|
||||
|
||||
Ok(())
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Here is the code to **wipe the entire flash database** and to **query the sensor's index table** to see exactly which slots are open and available.
|
||||
|
||||
1. New Command Constants
|
||||
|
||||
Add these additional instruction codes to your global definitions: [[1](https://forum.arduino.cc/t/how-to-call-functions-from-a-library/1184306)]
|
||||
|
||||
rust
|
||||
|
||||
```
|
||||
const CMD_EMPTY: u8 = 0x0D; // Empties the entire template flash library
|
||||
const CMD_READINDEXTABLE: u8 = 0x1F; // Reads the database occupancy index table
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
|
||||
2. Rust Code Implementation
|
||||
|
||||
The `CMD_READINDEXTABLE` function returns the occupancy of the database as a bitmask array. It takes a single index page identifier (typically `0x00` or `0x01` depending on whether your sensor holds more than 256 templates). Each byte returned represents 8 slots. **A bit set to `1` means the slot is full; a bit set to `0` means the slot is free.** [[1](https://www.freecodecamp.org/news/how-bloom-filters-work-build-one-from-scratch-python/), [2](https://www.signalhk.com/pdf/PDFIDW8F02ZL1.pdf)]
|
||||
|
||||
rust
|
||||
|
||||
```
|
||||
/// Erases every single fingerprint profile stored in the flash module database.
|
||||
fn empty_database(uart: &mut Uart) -> Result<(), Box<dyn Error>> {
|
||||
println!("⚠️ WARNING: Requesting complete fingerprint database format...");
|
||||
|
||||
// CMD_EMPTY takes no extra parameters
|
||||
let resp = send_command(uart, CMD_EMPTY, &[])?;
|
||||
|
||||
match handle_confirmation_code(resp[9]) {
|
||||
Ok(_) => {
|
||||
println!("🧹 Success! The entire fingerprint database has been completely emptied.");
|
||||
Ok(())
|
||||
}
|
||||
Err(e) => Err(format!("Formatting failed: {}", e).into()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Queries the internal memory index map and prints out all unallocated/free slot IDs.
|
||||
fn print_free_slots(uart: &mut Uart) -> Result<(), Box<dyn Error>> {
|
||||
println!("🔍 Fetching memory allocation table...");
|
||||
|
||||
// We request Index Page 0 (covering slots 0 to 255)
|
||||
// Parameter 0x00 instructs the sensor to return the map of the first 256 IDs.
|
||||
let resp = send_command(uart, CMD_READINDEXTABLE, &[0x00])?;
|
||||
handle_confirmation_code(resp[9])?;
|
||||
|
||||
// The data packet containing the index starts at byte index 10 in our response frame.
|
||||
// There are 32 bytes returned in total (32 bytes * 8 bits = 256 slots evaluated).
|
||||
let bitmask_bytes = &resp[10..42];
|
||||
|
||||
let mut free_slots_count = 0;
|
||||
print!("Free Slot IDs: ");
|
||||
|
||||
for (byte_idx, &byte) in bitmask_bytes.iter().enumerate() {
|
||||
for bit_idx in 0..8 {
|
||||
let slot_id = (byte_idx * 8) + bit_idx;
|
||||
|
||||
// Check if the bit at the current index position is 0 (Unallocated)
|
||||
let is_allocated = (byte >> bit_idx) & 0x01;
|
||||
|
||||
if is_allocated == 0 {
|
||||
print!("{} ", slot_id);
|
||||
free_slots_count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println!("\n📊 Summary: Found {} total vacant slots out of the first 256.", free_slots_count);
|
||||
Ok(())
|
||||
}
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
|
||||
3. Usage inside `main()`
|
||||
|
||||
You can execute these actions within your `main` runtime thread depending on what operation sequence you require:
|
||||
|
||||
rust
|
||||
|
||||
```
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
|
||||
uart.set_read_mode(1, Duration::from_millis(1000))?;
|
||||
|
||||
// Action 1: Print available memory slots before modification
|
||||
print_free_slots(&mut uart)?;
|
||||
|
||||
// Action 2: Factory reset / wipe everything (Uncomment to execute)
|
||||
// empty_database(&mut uart)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
```
|
||||
|
||||
Use code with caution.
|
||||
## References
|
||||
|
||||
- [Sparkfun Datasheet](https://cdn.sparkfun.com/assets/b/6/2/5/8/Fingerprint_sensor_module_User_Manual_v1.0_2019-1-22--.pdf)
|
||||
27
Notes/Electronics/General Electronics.md
Normal file
27
Notes/Electronics/General Electronics.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## Suppliers
|
||||
|
||||
- [Mouser](https://www.mouser.com/)
|
||||
- [Cloom Custom Wiring Harnesses](https://customwiringloom.com/)
|
||||
|
||||
## Soldering
|
||||
|
||||
- [Soldering Perfboard](https://www.instructables.com/Using-Perfboard/)
|
||||
|
||||
## Connectors & Cables
|
||||
|
||||
- [Fitting Duport Connectors](https://www.instructables.com/Fitting-Dupont-Connectors/)
|
||||
- IDC stands for Insulation Displacement Connector
|
||||
|
||||
## Electronics Learning Material
|
||||
|
||||
- [Kirchoffs’ Circuit Laws](https://en.wikipedia.org/wiki/Kirchhoff's_circuit_laws)
|
||||
- [LED Series Resistor Calculator | DigiKey Electronics](https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-led-series-resistor)
|
||||
- [Types of Switches](https://www.electricaltechnology.org/2014/11/types-of-switches-electrical.html#relay-as-a-switch)
|
||||
|
||||
## Breadboarding
|
||||
|
||||
- [How to attach an IDC connector to a breadboard](https://www.youtube.com/watch?v=b1_eRYr-t-I)
|
||||
- [Using Arduino with Node-RED to create a Simple Web Dashboard - YouTube](https://www.youtube.com/watch?v=ryEFNy1E_LU)
|
||||
- [Interfacing CD74HC4067 16-Channel Multiplexer with Arduino](https://electropeak.com/learn/interfacing-cd74hc4067-16-channel-analog-digital-multiplexer-with-arduino)
|
||||
- [MegaMUX - 32 Channel Multiplexer Breakout - Share Project - PCBWay](https://www.pcbway.com/project/shareproject/MegaMUX___32_Channel_Multiplexer_Breakout.html)
|
||||
|
||||
74
Notes/Electronics/I2C.md
Normal file
74
Notes/Electronics/I2C.md
Normal file
@@ -0,0 +1,74 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2026-03-08 20:22
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Notes on the I2C communication protocol.
|
||||
## Notes
|
||||
|
||||
### Using Cat6 Cable
|
||||
|
||||
For the best results running I2C signals over Cat6 cable, use a **shielded Cat6 cable** and pair each signal line (SDA/SCL) with a dedicated Ground (GND) wire in the same twisted pair. Lower your clock speed (e.g., to \(100kHz) or lower), and use active terminators or bus extenders if the distance exceeds 2 meters.
|
||||
|
||||
Follow this configuration, optimize your signals, and use active buffers for long runs to ensure reliability.
|
||||
|
||||
1. Pinout and Wiring Configuration
|
||||
|
||||
Use one of the standard twisted-pair configurations to isolate the data lines from cross-talk and noise.
|
||||
|
||||
- **Pair 1:** SDA + Ground
|
||||
- **Pair 2:** SCL + Ground
|
||||
- **Pair 3:** \(V_{DD}\) (Power) + Ground
|
||||
- **Pair 4:** Unused (Can be connected to Ground for extra shielding)
|
||||
|
||||
_Why this works:_ By twisting SDA and SCL with their respective Ground returns, you create a pseudo-differential pair. This guarantees noise immunity from external electromagnetic interference (EMI).
|
||||
|
||||
2. Signal Optimization
|
||||
|
||||
Because I2C was originally designed for short, PCB-level distances (<1m), using a cable introduces bus capacitance, which degrades the rising edge of your signal.
|
||||
|
||||
- **Reduce the Clock Speed:** Drop your I2C frequency from (400kHz to 100kHz) or (10kHz) to prevent communication dropouts.
|
||||
- **Adjust Pull-Up Resistors:** Standard I2C requires pull-up resistors. Over a long cable, the higher capacitance slows down data transitions. You may need to use stronger pull-up resistors (lower resistance value, down to (approx. 1 KΩ - 2.2KΩ) depending on your bus capacitance.
|
||||
- **Add Series Resistors:** Add a small resistor (100Ω) to the SDA and SCL lines on both ends of the cable to dampen signal reflections.
|
||||
|
||||
3. Bus Extenders for Extended Distances
|
||||
|
||||
If your distance exceeds 2 to 3 meters, the bus capacitance of Cat6 (typically 50pF to 52pF per meter) will exceed the I2C standard of (400pF).
|
||||
|
||||
For distances between 5 and 50 meters, utilize specific hardware rather than running raw I2C:
|
||||
|
||||
- **LTC4311:** An active terminator IC that actively pulls up and terminates the signal.
|
||||
- **PCA9615 / PCA9600:** Differential I2C bus extenders that convert the signal to a differential format. This allows I2C signals to safely travel up to 100 meters.
|
||||
|
||||
For tips on how to correctly terminate wires inside a standard RJ-45 plug to build your extension cables:
|
||||
|
||||
### 4 wire
|
||||
|
||||
Using standard I2C over a long 4-wire twisted pair cable (like Ethernet) causes signal degradation, capacitance issues, and crosstalk. For reliable operation, use differential I2C extenders (e.g., [PCA9615 I2C Buffer](https://www.nxp.com/docs/en/data-sheet/PCA9615.pdf)). Otherwise, map standard I2C strictly as: **Pair 1** (SDA + Power/GND) and **Pair 2** (SCL + Power/GND).
|
||||
|
||||
Standard I2C uses non-differential, single-ended signals. Twisting the wrong wires together creates significant crosstalk and capacitive coupling. To minimize signal corruption:
|
||||
|
||||
- **Never twist SDA and SCL together:** Twisting your two data lines together is the fastest way to cause I2C communication failures.
|
||||
- **Twist with a Return Path:** Twist the **SCL** line with a Ground (**GND**) wire, and twist the **SDA** line with a Voltage (**\(V_{CC}\)**) wire.
|
||||
- **Reduce Clock Speed:** Drop the I2C clock frequency (e.g., down to \(100\text{ kHz}\) or lower) to compensate for cable capacitance and avoid signal reflections.
|
||||
|
||||
#### Extending I2C Long Distances (Differential Signaling)
|
||||
|
||||
If you need to run your I2C bus over long distances (beyond a few feet), standard I2C will fail. You should convert the single-ended I2C signal into a differential signal using a buffer IC like the **PCA9615**.
|
||||
|
||||
- **How it works:** It takes standard I2C and translates it into 4 differential lines.
|
||||
- **Wiring:** The 4-wire twisted pair is mapped as two separate differential pairs:
|
||||
1. `SCL_A` and `SCL_B` (Clock Pair)
|
||||
2. `SDA_A` and `SDA_B` (Data Pair)
|
||||
- **Benefit:** Differential signaling cancels out electromagnetic interference, allowing you to run I2C reliably across \(30\text{ meters}\) (\(100\text{ feet}\)) or more.
|
||||
## References
|
||||
|
||||
- [Differential signalling with I2C](https://hackaday.com/2017/03/31/an-introduction-to-differential-i%C2%B2c/)
|
||||
- [AdaFruit I2C Active Terminator](https://cdn-learn.adafruit.com/downloads/pdf/adafruit-ltc4311-i2c-extender-active-terminator.pdf)
|
||||
- [How I2C Works](https://learn.sparkfun.com/tutorials/i2c/all)
|
||||
- [Differential I2C](duction-to-differential-i²c/)
|
||||
- [[Differential Signalling]]
|
||||
- [PCA9615](https://www.nxp.com/docs/en/data-sheet/PCA9615.pdf)
|
||||
4
Notes/Electronics/KiCad.md
Normal file
4
Notes/Electronics/KiCad.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# KiCad
|
||||
|
||||
Documentation - [https://kicad.github.io/](https://kicad.github.io/)
|
||||
|
||||
14
Notes/Electronics/Level Converter Boards.md
Normal file
14
Notes/Electronics/Level Converter Boards.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2026-07-08 17:24
|
||||
---
|
||||
## Summary
|
||||
|
||||
Each board contains four identical circuits using BSS138 MOSFETs. The ground pins are not connected to the circuit in any way and are not needed for it to function. A low level output is sinked through the corresponding input signal (MCU GPIO pin). A high level output is sourced through the corresponding Vin pin (LV or HV) through a 10k resistor. If an input is left floating, the corresponding output will go high. If using unidirectionally you can put a strong pull down resistor (1k) on the input side. A pull down on the output side will cause malfunction.
|
||||
|
||||
## References
|
||||
|
||||
![[level_shifter_circuit_diagram.jpg.jpg]]
|
||||
|
||||
![[level_shifter_board_pic.jpg]]
|
||||
4
Notes/Electronics/Magnetic Lock.md
Normal file
4
Notes/Electronics/Magnetic Lock.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Magnetic Lock
|
||||
|
||||
[https://forums.raspberrypi.com/viewtopic.php?t=268354](https://forums.raspberrypi.com/viewtopic.php?t=268354)
|
||||
|
||||
6
Notes/Electronics/NFC.md
Normal file
6
Notes/Electronics/NFC.md
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
NFC is different from RFID. It’s way for two devices to communicate when in close proximity. NFC readers can also read RFID cards.
|
||||
|
||||
- [PN532 NFC/RFID card](https://www.adafruit.com/product/364)
|
||||
- [GitHub - adafruit/Adafruit-PN532: Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip](https://github.com/adafruit/Adafruit-PN532/tree/master)
|
||||
|
||||
22
Notes/Electronics/PCA9685 16 x 12bit PWM.md
Normal file
22
Notes/Electronics/PCA9685 16 x 12bit PWM.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-07-06 23:38
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The PCA 9685 chip provides 16 channels of 12 bit PWM with a configurable PWM frequency for servo motor or LED control.
|
||||
## Notes
|
||||
|
||||
Default I²C address for the PCA9685 board is 0x40.
|
||||
## References
|
||||
|
||||
- https://crates.io/crates/pwm-pca9685 - supports setting address and
|
||||
- [`pca9685_rppal`](https://crates.io/crates/pca9685-rppal) - only supports default address of 0x40 and hides the I2C interface!
|
||||
- https://docs.rs/pca9685-rppal/0.1.0/pca9685_rppal/index.html
|
||||
- https://github.com/jlyonsmith/pca9685-rppal
|
||||
- https://www.adafruit.com/product/815
|
||||
- https://cdn-shop.adafruit.com/datasheets/PCA9685.pdf
|
||||
- https://learn.adafruit.com/16-channel-pwm-servo-driver/hooking-it-up
|
||||
- https://blog.eldruin.com/pca9685-pwm-led-servo-controller-driver-in-rust
|
||||
20
Notes/Electronics/Photoresistors.md
Normal file
20
Notes/Electronics/Photoresistors.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-07-20 12:21
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Resistors that change resistance based on the amount of light hitting them.
|
||||
## Notes
|
||||
|
||||
Typically require an amplification circuit to interface to RPi.
|
||||
|
||||
## References
|
||||
|
||||
- [Photoresistors GL55-series comparison](https://ednieuw.home.xs4all.nl/Woordklok/LDR/GL55xxLDRs.html)
|
||||
- https://www.handsontec.com/dataspecs/sensor/GL55-LDR.pdf
|
||||
- [Getting Started With KY-037 Sound Sensor & Raspberry Pi (P1) : 3 Steps - Instructables](https://www.instructables.com/Getting-Started-With-KY-037-Sound-Sensor-Raspberry)
|
||||
|
||||
![[GL55xx.pdf]]
|
||||
12
Notes/Electronics/Power Supplies.md
Normal file
12
Notes/Electronics/Power Supplies.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Power Supplies
|
||||
|
||||
Power supply requirements for different boards.
|
||||
|
||||
## Arduino
|
||||
|
||||
[What power supply can I use with my Arduino board?](https://support.arduino.cc/hc/en-us/articles/360018922259-What-power-supply-can-I-use-with-my-Arduino-board)
|
||||
|
||||
## Raspberry Pi
|
||||
|
||||
[How to Power a Raspberry Pi: Pro Tips for Every Use](https://raspberrytips.com/how-to-power-a-raspberry-pi/)
|
||||
|
||||
16
Notes/Electronics/RGB LED's.md
Normal file
16
Notes/Electronics/RGB LED's.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-07-06 23:42
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
RGB LED's come in two flavors, common anode and common cathode.
|
||||
## Notes
|
||||
|
||||
|
||||
|
||||
## References
|
||||
|
||||
- https://www.build-electronic-circuits.com/rgb-led/
|
||||
27
Notes/Electronics/RJ9 Connectors.md
Normal file
27
Notes/Electronics/RJ9 Connectors.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2026-05-29 18:26
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The RJ9 connector (often referred to as RJ10 or RJ22) is a4-position, 4-conductor (4P4C) modular plug standard used to connect telephone handsets to phone bases.
|
||||
|
||||
| Pin Number | Standard Handset Color | Description |
|
||||
| ---------- | ---------------------- | ---------------------------- |
|
||||
| **Pin 1** | Blue / White | Handset Receiver (RX) |
|
||||
| **Pin 2** | Yellow / Black | Receiver / Microphone Ground |
|
||||
| **Pin 3** | Green / Red | Microphone (TX) Ground |
|
||||
| **Pin 4** | Red / Green | Microphone Power / TX |
|
||||
|
||||
#### Pinout Orientation
|
||||
|
||||
When looking at the gold pins of the male plug facing you (with the locking clip facing **down**), Pin 1 is on your **far left** and Pin 4 is on your **far right**. [[1](https://www.youtube.com/watch?v=miMuRXJVNYI&t=3)]
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
|
||||
## References
|
||||
|
||||
19
Notes/Electronics/Raspberry Pi Ethernet.md
Normal file
19
Notes/Electronics/Raspberry Pi Ethernet.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-05-01 15:11
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Raspberry Pi only supports a limited set of ethernet dongles. See the list. You must use Raspberry Pi OS and not Ubuntu/Debian.
|
||||
|
||||
The two that you can get on Amazon are:
|
||||
|
||||
- [TP-Link UE300](https://www.amazon.com/gp/product/B00YUU3KC6?smid=ATVPDKIKX0DER) - USB 3.0. Dongle is really short and hard to position, but it works.
|
||||
- [TRENDNet TU2-ET100](https://www.amazon.com/TRENDnet-Ethernet-Network-Compatible-TU2-ET100/dp/B00007IFED) - USB 2.0. Has a long ship time.
|
||||
|
||||
## References
|
||||
|
||||
- https://elinux.org/RPi_USB_Ethernet_adapters
|
||||
- https://www.trendnet.com/products/product-detail?prod=290_TU2-ET100
|
||||
57
Notes/Electronics/Raspberry Pi GPIO Expanders.md
Normal file
57
Notes/Electronics/Raspberry Pi GPIO Expanders.md
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
|
||||

|
||||
|
||||
- [The MegaMUX project shows how to multiplex 5 GPIO lines into 32 read/write channels](https://www.instructables.com/MegaMUX-32-Channel-Multiplexer-Tutorial/)
|
||||
- [You can order the PCB board from PCBWay](https://www.pcbway.com/project/shareproject/MegaMUX___32_Channel_Multiplexer_Breakout.html?upId=0)
|
||||
|
||||

|
||||
|
||||
[](https://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/)
|
||||
|
||||
## Small Batch PCB Manufacturers
|
||||
|
||||
- [OSHPark](https://oshpark.com/)
|
||||
- [PCBWay](https://www.pcbway.com/project/)
|
||||
- [PCBWay Gerber Viewer](https://www.pcbway.com/project/OnlineGerberViewer.html)
|
||||
- [PCBWay 3D Model Viewer](https://www.pcbway.com/project/Online3DViewer.html)
|
||||
- [How to order on PCBWay](https://www.youtube.com/watch?v=CpbV6PjRFWw)
|
||||
- [CircuitMaker](https://circuitmaker.com/)
|
||||
- [4PCB](https://www.4pcb.com/)
|
||||
- [Technotronix](https://www.technotronix.us/)
|
||||
|
||||
## PCB Design Software
|
||||
|
||||
- [List of PCB design software](https://www.electroschematics.com/pcb-design-software/)
|
||||
- [KiCad](https://www.kicad.org)
|
||||
- [KiCad tutorial](https://www.youtube.com/watch?v=3FGNw28xBr0)
|
||||
- [Getting Started in KiCad](file:///Applications/KiCad/KiCad.app/Contents/SharedSupport/help/en/getting_started_in_kicad.html)
|
||||
- [KiCad documentation](https://docs.kicad.org/)
|
||||
- [Top 15 Mistakes When Designing PCB](https://www.youtube.com/watch?v=hkSad4n76Lc)
|
||||
- [How to rename a KiCad project](https://forum.kicad.info/t/how-to-rename-a-kicad-project/33194)
|
||||
|
||||
## Multiplexors
|
||||
|
||||
- [TI CD405xB CMOS Spec Sheet](https://www.ti.com/lit/ds/symlink/cd4051b.pdf)
|
||||
|
||||
## Dupont Connectors
|
||||
|
||||
- [How to find Duport connectors on DigiKey](https://forum.digikey.com/t/dupont-connectors-and-how-to-find-them-from-digi-key/3315)
|
||||
|
||||
## Ribbon Cables
|
||||
|
||||
- [Making flat ribbon cables at home](https://www.youtube.com/watch?v=40oXq8tCrBA)
|
||||
- [Ribbon cable types](https://www.wiringo.com/ribbon-cable-3.html)
|
||||
|
||||
|
||||
## References
|
||||
- [Flat Ribbon Cables](https://www.digikey.com/en/products/filter/flat-ribbon-cables/472?s=N4IgjCBcoOwBxVAYygMwIYBsDOBTANCAPZQDa4AbAMwCsMFIAuoQA4AuUIAymwE4CWAOwDmIAL6EqYBtBApIGHAWJkQ1AJxwGhAExwwAFjAAGJqw6RufIaLESQNRCBZQwrF5B007QA)
|
||||
- [AWG23-08/G-1/300 grey ribbon cable](https://www.digikey.com/en/products/detail/assmann-wsw-components/AWG28-08-G-1-300/2391671)
|
||||
- [Expand Raspberry Pi GPIOs with I2C Port Expander](https://tutorials-raspberrypi.com/expand-raspberry-pi-gpios-with-i2c-port-expander/)
|
||||
- [10 Best GPIO Extension Board For Raspberry Pi](https://wonderfulengineering.com/10-best-gpio-extension-board-raspberry-pi/)
|
||||
- [Controlling 32 lights with the Raspberry Pi - Raspberry Pi Forums](https://forums.raspberrypi.com/viewtopic.php?t=77560)
|
||||
- [rppal_mcp23s17 - Rust](https://docs.rs/rppal-mcp23s17/latest/rppal_mcp23s17)
|
||||
- [GitHub - quartiq/mcp230xx: MCP23017/MCP23008 a 16-Bit/8-Bit I2C I/O Expander with I2C Interface](https://github.com/quartiq/mcp230xx)
|
||||
- [Using GPIO Expander MCP23017 With Arduino (Get up to 128 GPIOs)](https://www.makerguides.com/using-gpio-expander-mcp23017-with-arduino)
|
||||
- [How to use the MCP23017 Port Expander with the Raspberry Pi | The Pi Hut](https://thepihut.com/blogs/raspberry-pi-tutorials/how-to-use-the-mcp23017-port-expander)
|
||||
|
||||
4
Notes/Electronics/Raspberry Pi HATS.md
Normal file
4
Notes/Electronics/Raspberry Pi HATS.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Raspberry Pi HATS
|
||||
|
||||
[Best Raspberry Pi HATs 2023: Expansion Boards for Every Project](https://www.tomshardware.com/best-picks/best-raspberry-pi-hats)
|
||||
|
||||
14
Notes/Electronics/Raspberry Pi Zero.md
Normal file
14
Notes/Electronics/Raspberry Pi Zero.md
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
## References
|
||||
|
||||
- [Setup and example](https://www.freecodecamp.org/news/embedded-rust-programming-on-raspberry-pi-zero-w/)
|
||||
- [Adding Ethernet to a Pi Zero - Raspberry Pi Spy](https://www.raspberrypi-spy.co.uk/2020/05/adding-ethernet-to-a-pi-zero/)
|
||||
- https://www.mouser.com/ProductDetail/Raspberry-Pi/SC0065?qs=rQFj71Wb1eX99SHol2bUwA%3D%3D
|
||||
- https://www.makeuseof.com/troubleshoot-raspberry-pi-leds-solid-flashing-meaning
|
||||
- [https://bws428.github.io/assets/images/pi-zero-w-gpio-pinout.png](https://bws428.github.io/assets/images/pi-zero-w-gpio-pinout.png)
|
||||
- [https://www.electrorules.com/wp-content/uploads/2022/01/R-Pi-Zero-Pinout.jpg](https://www.electrorules.com/wp-content/uploads/2022/01/R-Pi-Zero-Pinout.jpg)
|
||||
- [https://raspberrytips.com/raspberry-pi-gpio-pinout/](https://raspberrytips.com/raspberry-pi-gpio-pinout/)
|
||||
- [https://docs.golemparts.com/rppal/0.17.1/rppal/spi/](https://docs.golemparts.com/rppal/0.17.1/rppal/spi/)
|
||||
- [Order in bulk from DigiKey](https://www.digikey.com/en/products/detail/raspberry-pi/SC0020/18150025)
|
||||
- [Raspberry Pi Hardware](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html)
|
||||
- [50 of the most important Raspberry Pi Sensors and Components](https://tutorials-raspberrypi.com/raspberry-pi-sensors-overview-50-important-components/#other)
|
||||
32
Notes/Electronics/Raspberry Pico.md
Normal file
32
Notes/Electronics/Raspberry Pico.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-01-16 13:05
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Information about the Raspberry Pi Pico 2.
|
||||
## Abstract
|
||||
|
||||
There is a WizNet version that includes hardwired ethernet.
|
||||
|
||||
You can use Rust to develop Raspberry Pico applications.
|
||||
|
||||
The Pico does not run at full O/S. It is more closely related to an Arduino than an full
|
||||
## References
|
||||
|
||||
- https://github.com/WIZnet-ioNIC/WIZnet-PICO-C/tree/main
|
||||
- https://docs.wiznet.io/Product/Open-Source-Hardware/wiznet_ethernet_hat
|
||||
- https://peppe8o.com/raspberry-pi-pico-ethernet-port-adding-the-wiznet-ethernet-hat
|
||||
- https://eshop.wiznet.io/shop/module/w5100s-evb-pico
|
||||
- [Running Rust Programs on Raspberry Pi Pico Alex Wilson](https://www.alexdwilson.dev/learning-in-public/running-rust-code-on-raspberry-pi-pico)
|
||||
- https://github.com/rp-rs
|
||||
- https://www.etechnophiles.com/raspberry-pi-pico-2-pinout-specs/
|
||||
- https://www.raspberrypi.com/news/how-to-add-ethernet-to-raspberry-pi-pico/
|
||||
- [Rust & Raspberry Pi Pico (Blink)](https://www.fullstacklabs.co/blog/rust-raspberry-pi-pico-blink)
|
||||
- https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
|
||||
- https://github.com/rp-rs/rp-hal
|
||||
- https://github.com/newAM/w5500-rs
|
||||
- https://github.com/newAM/ambientsensor-rs/tree/main
|
||||
|
||||
37
Notes/Electronics/Reverse Engineering PCB's.md
Normal file
37
Notes/Electronics/Reverse Engineering PCB's.md
Normal file
@@ -0,0 +1,37 @@
|
||||
## One Sided Two Layer Board
|
||||
|
||||
1. Remove all components and measure them
|
||||
2. Sand away the solder mask from PCB, both sides
|
||||
3. Add all components, values, designators and packages to KiCad schema editor
|
||||
4. Import all components to layout editor; hit F8 to keep syncing with the schema editor
|
||||
5. Take photo of front/back of PCB
|
||||
6. Flip back image to align with front when imported
|
||||
7. Add images of front PCB in KiCad on user layer
|
||||
8. Double click image and set scale factor to actual PCB height divided by original height of imported photo
|
||||
9. Double click to lock image
|
||||
10. Select the back layer of PCB
|
||||
11. Import back photo an scale also
|
||||
12. Align front and back images by hiding/showing front layer
|
||||
13. Place all components using the front image as a guide
|
||||
14. Switch to showing components in outline mode to help see traces
|
||||
15. Hold Control key to select pads, switch to schematic editor and the connections will be highlighted; join them.
|
||||
17. Keep traces same width; use Q key while routing a trace to change width, V to add a via
|
||||
18. Mark and join all ground traces using a Ground symbol; add VCC markers as needed
|
||||
19. Right click unused pads and select footprint editor; select unused pads and remove them
|
||||
20. In schematic editor, select any unused pins and delete them
|
||||
21. Continue adding all components until done
|
||||
22. Use image outline to set a cut line for the board
|
||||
23. Add a thermal zone assigned to ground and set thermal relief gap to match image; hit B to fill in zone
|
||||
24. Add thermal via's underneath chips as needed
|
||||
25. Trace connectors on underside of PCB
|
||||
26. Note you can change trace thickness as you draw
|
||||
27. Switch to other side/trace when routing using V in layout editor
|
||||
## Notes
|
||||
|
||||
- Diodes have A for anode (positive side) and K for cathode (negative/ground side).
|
||||
## References
|
||||
|
||||
- [Reverse Engineer PCB With KiCAD 7](https://www.youtube.com/watch?v=EUdbxKgsFl8)
|
||||
- [PCBWay - PCB Prototype & Fabrication Manufacturer](https://www.pcbway.com)
|
||||
- [KiCad 6: Ground Plane (Filled Zone)](https://www.youtube.com/watch?v=8NV5cuPbVm0&t=6s)
|
||||
- [KiCad 6: Fix Silkscreen Clipped by Solder Mask](https://www.youtube.com/watch?v=dgQZIDaHSZU)
|
||||
25
Notes/Electronics/Rust `rppal` Crate.md
Normal file
25
Notes/Electronics/Rust `rppal` Crate.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-11-06 17:37
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Notes on the use of the [rppal]() crate.
|
||||
## Notes
|
||||
|
||||
### GPIO Pull Up/Pull Down Bias
|
||||
|
||||
The `rppal::gpio::InputPin::set_bias` method is used to configure the Raspberry Pi's **built-in pull-up or pull-down resistors** on an input pin.
|
||||
|
||||
You should use `set_bias` when interfacing with digital input sensors or switches that do not have their own external pull-up/pull-down resistors. These internal resistors ensure the input pin has a defined logic level (either high or low) when the external component is disconnected or floating, preventing erratic readings caused by electrical noise.
|
||||
|
||||
| When to Use | Typical Connection | |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| **`Bias::PullUp`** | When the input is connected to ground (GND) to signal a "low" state (e.g., a button connecting the pin to GND). The resistor pulls the pin voltage up to 3.3V by default. | One side of a button to the GPIO pin, the other side to GND. |
|
||||
| **`Bias::PullDown`** | When the input is connected to 3.3V to signal a "high" state (e.g., a sensor outputting 3.3V). The resistor pulls the pin voltage down to GND by default. | One side of a button to the GPIO pin, the other side to 3.3V. |
|
||||
| **`Bias::Off`** | When the external circuit already provides a defined logic level (e.g., an active sensor with a strong output signal, or an external pull-up/pull-down resistor is used). | Active sensor output connected directly to the GPIO pin. |
|
||||
|
||||
## References
|
||||
|
||||
16
Notes/Electronics/Sound Sensor SY-M213.md
Normal file
16
Notes/Electronics/Sound Sensor SY-M213.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-07-26 16:20
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
|
||||
## References
|
||||
|
||||
- [How to Use a Sound Sensor With Arduino : 5 Steps - Instructables](https://www.instructables.com/How-to-Use-a-Sound-Sensor-With-Arduino)
|
||||
31
Notes/Electronics/Switches and Relays.md
Normal file
31
Notes/Electronics/Switches and Relays.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Switches and Relays
|
||||
|
||||
[](https://arduinogetstarted.com/tutorials/arduino-relay)
|
||||
|
||||
[](https://radiostud.io/howto-i2c-communication-rpi/)
|
||||
|
||||
Types of switches:
|
||||
|
||||
- Push on/off
|
||||
- Toggle on/off
|
||||
- Magnetic
|
||||
- Capacitance
|
||||
- Resistance
|
||||
- Proximity
|
||||
- Temperature
|
||||
- Pressure
|
||||
|
||||
[](https://www.electronicshub.org/switches/)
|
||||
|
||||
[](https://electronics.stackexchange.com/questions/113574/understanding-a-circuit-for-reading-current-passing-through-human-bodies)
|
||||
|
||||
[](https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/python-circuitpython)
|
||||
|
||||
[](https://www.instructables.com/Capacitive-Switch-for-Arduino/)
|
||||
|
||||
[](https://electronics.stackexchange.com/questions/444488/how-to-build-a-human-chain-detection-circuit)
|
||||
|
||||
[](https://www.youtube.com/watch?v=m5PfKb8p1YI)
|
||||
|
||||
[](https://forum.arduino.cc/t/human-chain-body-conductivity/634793)
|
||||
|
||||
27
Notes/Electronics/USB Connectors.md
Normal file
27
Notes/Electronics/USB Connectors.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
created: 2025-04-25 10:48
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
USB connectors come in A, B and C standards.
|
||||
|
||||
*Need a table of the different standards, male/female version, micro and mini versions, plus special instances*
|
||||
## Notes
|
||||
|
||||
### All
|
||||
|
||||
![[USB-ports-pinout_800x450-3353867086.jpg]]
|
||||
|
||||
### USB Micro A and USB Micro B
|
||||
|
||||
[USB-micro-A-and-B-pinout-134975395.webp](USB-micro-A-and-B-pinout-134975395.webp)
|
||||
|
||||
![[Micro-USB-Pinout.jpg]]
|
||||
|
||||
## References
|
||||
|
||||
- [Why do some USB Type B cables have an ID pinout but others have a DGND pinout?](https://electronics.stackexchange.com/questions/646803/why-do-some-usb-type-b-cables-have-an-id-pinout-but-others-have-a-dgnd-pinout-h)
|
||||
- [USB - Wikipedia](https://en.wikipedia.org/wiki/USB)
|
||||
11
Notes/Electronics/Understanding Electronics Certification.md
Normal file
11
Notes/Electronics/Understanding Electronics Certification.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
tags:
|
||||
- resource
|
||||
---
|
||||
## Summary
|
||||
|
||||
UL certification is only required for items that plug into mains power. FCC certification is needed for anything that oscillates at >9KHz.
|
||||
|
||||
## References
|
||||
|
||||
- [Understanding Certifications for Electronic Hardware Products](https://predictabledesigns.com/understanding-certifications-for-electronic-hardware-products)
|
||||
3
Notes/Electronics/Vibration Sensors.md
Normal file
3
Notes/Electronics/Vibration Sensors.md
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
- [How to Setup Vibration Sensors on the Arduino - Circuit Basics](https://www.circuitbasics.com/how-to-setup-vibration-sensors-on-the-arduino)
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
views:
|
||||
- type: table
|
||||
name: Table
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
created: 2026-06-07
|
||||
Index: "[[Odin]]"
|
||||
tags:
|
||||
- software
|
||||
- electrical
|
||||
- table-candles
|
||||
source:
|
||||
active: false
|
||||
completed: 2026-07-01
|
||||
---
|
||||
# Goal
|
||||
|
||||
Create good looking PWM based candles that are mounted to the table in Odin's Dilemma. This will remove the need to replace batteries in the candles, saving money and simplifying the room reset.
|
||||
## Tasks
|
||||
|
||||
- [ ] Buy caps ➕ 2026-07-11
|
||||
- [ ] Install wooden caps over screws ➕ 2026-07-11
|
||||
- [x] Create good looking candles
|
||||
- [x] Wax dripping down
|
||||
- [x] Base: screw holes for mounting, secured in candles
|
||||
- [x] Wires go out
|
||||
- [x] Create LED s with resistors
|
||||
- [x] Resistors wired directly to LEDs (for 12 v) so it is clean
|
||||
- [ ] Place LED s in candles
|
||||
- [x] Wire 3 mosfet boards
|
||||
- [x] Test mosfet boards with LED s on test rig
|
||||
- [x] Create path for wires from mosfet/raspberry pi
|
||||
- [x] Route wires to candle locations
|
||||
- [x] Mount candles to table ✅ 2026-07-11
|
||||
- [x] Wooden/3d printed base to hold candles together? ✅ 2026-07-11
|
||||
- [x] Wire candles ✅ 2026-07-11
|
||||
- [x] Software ✅ 2026-07-11
|
||||
- [x] PWM control for the 2 mosfet boards
|
||||
- [x] Integrate into the escape room control ✅ 2026-07-11
|
||||
|
||||
## PWM Candles Software
|
||||
|
||||
1. User inputs the desired LED pins (via mosfets) to program
|
||||
2. Program sets them as output
|
||||
3. Program flickers each pin simultaniously, but with different flicker rates.
|
||||
## References:
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
created: 2026-06-11T23:23:00
|
||||
Index: "[[Odin]]"
|
||||
tags:
|
||||
- software
|
||||
- odin
|
||||
source: https://git.mozayik.net/john/odin/src/branch/main/odin_table
|
||||
---
|
||||
# Wyatt's Notes on Odin Code
|
||||
---
|
||||
## config_file.rs
|
||||
### Outline
|
||||
- Imports
|
||||
- ConfigFile struct
|
||||
- nats stuff
|
||||
- log level
|
||||
- ping interval
|
||||
- solved cup order 1
|
||||
- solved cup order 2
|
||||
- Impl ConfigFile
|
||||
- [ ] This has to do with loading and 'understanding' the path to the config file?
|
||||
- Impl Default for ConfigFile
|
||||
- Sets all of the values defaults to: None
|
||||
### Purpose
|
||||
- As far as I can tell: setting up configuration for other files, mainly by setting up structs and implementations, set to `pub` for the use inside of other files
|
||||
|
||||
## server.js
|
||||
### Outline
|
||||
-
|
||||
|
||||
|
||||
---
|
||||
## References:
|
||||
Reference in New Issue
Block a user