Conversation
sync branches?
did some arduino tests
did some arduino tests
changed planning
changed some typos
added warning/problem
Removed completed tasks and added new tasks for weeks 3 to 5.
Removed completed tasks from the README for clarity.
Co-authored-by: Jana-Elst <187283975+Jana-Elst@users.noreply.github.com>
Optimize media assets to fix GitHub Pages deployment failures
There was a problem hiding this comment.
Pull request overview
This PR syncs content and prototype code updates by migrating blog media references to more web-friendly formats, adding/adjusting Arduino test sketches, and updating the project planning notes in the README.
Changes:
- Update blog post
heroImagereferences from.pngto.webpand embedded video imports from.MOVto.mp4. - Add multiple Arduino test sketches for dial reading and SD-card audio playback; tweak relay test default states.
- Refresh the README planning section with progress tracking and additional tasks.
Reviewed changes
Copilot reviewed 24 out of 105 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| blog/src/content/blog/20260202-making-the-housing.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260201-soldering-2.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260129-ring-the-bell-2.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260128-ring-the-bell.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260127-debugging-and-soundcards.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260123-first-python-script.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260122-code-for-the-arduinos.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260121-a-professional-circuit.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260120-recap.md | Add a highlighted callout block in the post. |
| blog/src/content/blog/20260118-buffering-and-bytes.mdx | Switch hero image to .webp; update video imports to .mp4. |
| blog/src/content/blog/20260117-raspberry-pi-getting-started.mdx | Switch hero image to .webp; update video import to .mp4. |
| blog/src/content/blog/20260115-my-first-pi-steps.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260114-reading-dialed-number.mdx | Switch hero image to .webp; update video imports to .mp4. |
| blog/src/content/blog/20260113-the-wrong-relays.mdx | Switch hero image to .webp; update video imports to .mp4. |
| blog/src/content/blog/20260110-music.mdx | Update video imports to .mp4. |
| blog/src/content/blog/20260109-a-broken-phone.md | Switch hero image reference to .webp. |
| blog/src/content/blog/20260108-componets.md | Switch hero image and inline image to .webp. |
| blog/src/content/blog/20260106-intercom.mdx | Switch hero image + images to .webp; update video imports to .mp4. |
| blog/src/content/blog/20260105-hardware.md | Switch hero image + gallery images to .webp. |
| blog/src/assets/pictures/20260113-header.webp | Add a new .webp asset to support updated blog references. |
| arduinoTests/20260114-1-reading-dial/20260114-1-reading-dial.ino | Add dial pulse counting sketch with debounce + timeout logic. |
| arduinoTests/20260113_1_relaisPlay2Songs/20260113_1_relaisPlay2Songs.ino | Add SD/WAV playback sketch alternating between two outputs. |
| arduinoTests/20260113-1-relaisPlay1Song/20260113-1-relaisPlay1Song.ino | Add SD/WAV playback sketch for a single output. |
| arduinoTests/20260112-1-testRelays/20260112-1-testRelays.ino | Change initial relay pin writes (LOW → HIGH). |
| README.md | Update planning checklist/progress notes and add tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // If the pulse is real and the state has actually changed | ||
| static int stableState = LOW; | ||
| if (reading != stableState) { | ||
| stableState = reading; |
There was a problem hiding this comment.
stableState is initialized to LOW while dialPin uses INPUT_PULLUP (idle HIGH). On first stable read this will flip to HIGH and increment pulseCount, creating a phantom pulse on startup. Initialize stableState from the first reading (or set it to HIGH in setup) to avoid counting an initial pulse.
| // If the pulse is real and the state has actually changed | |
| static int stableState = LOW; | |
| if (reading != stableState) { | |
| stableState = reading; | |
| // Initialize the stable state from the first stable reading to avoid a phantom pulse | |
| static int stableState; | |
| static bool stableStateInitialized = false; | |
| if (!stableStateInitialized) { | |
| stableState = reading; | |
| stableStateInitialized = true; | |
| } else if (reading != stableState) { | |
| // If the pulse is real and the state has actually changed | |
| stableState = reading; |
| // Start with the relay OFF (NC connected to C) | ||
| digitalWrite(RELAY_PIN1, LOW); | ||
| digitalWrite(RELAY_PIN2, LOW); | ||
| digitalWrite(RELAY_PIN1, HIGH); | ||
| digitalWrite(RELAY_PIN2, HIGH); |
There was a problem hiding this comment.
The comment says the relay starts OFF with “NC connected to C”, but the code now sets both relay pins HIGH. If these relay modules are active-low, HIGH would actually be OFF; if they’re active-high, this would be ON. Please align the comment (and indentation) with the actual relay logic so the setup state is unambiguous.
| - ~~send instructions to the arduino to open & close the relais at the right moments~~ | ||
| - ~~add relais for the bell to the circuit~~ | ||
| - ~~write extra arduino code~~ | ||
| -~~change sound system to the usbcards (instead of the arduino) (Wednesday)~~ |
There was a problem hiding this comment.
Markdown list item is missing a space after -, so it may not render as a list entry (and the strikethrough may not apply consistently). Add a space so it’s - ~~change ...~~.
| -~~change sound system to the usbcards (instead of the arduino) (Wednesday)~~ | |
| - ~~change sound system to the usbcards (instead of the arduino) (Wednesday)~~ |
| - The dail -> Thursday | ||
| - How does it work? | ||
| - Detect which number is dialed | ||
| - ~~The dail -> Thursday~~ |
There was a problem hiding this comment.
Typo in task name: “dail” should be “dial”.
| - ~~The dail -> Thursday~~ | |
| - ~~The dial -> Thursday~~ |
| pubDate: 'Feb 01 2026' | ||
| heroImage: ../../assets/pictures/20260201-header.png | ||
| heroImage: ../../assets/pictures/20260201-header.webp |
There was a problem hiding this comment.
After switching the hero image reference to the .webp, the old .png version appears to be unreferenced in the repo. Consider removing the unused .png asset (or moving source assets to a separate location) to avoid repo/bundle bloat.
| <div style="background-color: #FFD700; padding: 25px; margin-top: 50px;"> | ||
|
|
||
| > Vanaf hier heb ik eigenlijk geen idee meer hoe ik verder moet... | ||
| > Geen idee hoe ik de verschillende circuits aan elkaar moet hangen, noch hoe ik geluidsignalen moet opnemen... | ||
|
|
||
| </div> |
There was a problem hiding this comment.
The callout uses inline CSS styles inside markdown. This is the only place in the blog posts using style=, which makes theming harder and can be blocked by stricter CSP/sanitizers. Consider replacing this with a semantic wrapper + CSS class defined in the site styles (and keep the markdown content outside the HTML wrapper if possible).
| const int bufferSize = 64; | ||
| uint8_t buf[bufferSize]; | ||
| volatile int head = 0, tail = 0; | ||
|
|
||
| File file; | ||
| volatile bool playing = false; | ||
|
|
There was a problem hiding this comment.
head/tail are volatile int and are read/written from both loop() and the ISR. On AVR, int is 16-bit and updates are not atomic, so the ISR can observe torn values and corrupt the ring buffer. Use an 8-bit type for indices (bufferSize=64 fits), or protect multi-byte reads/writes with an atomic section.
| // Use 'volatile' for variables shared between loop and ISR | ||
| const int bufferSize = 64; // Reduced to 64 to save RAM | ||
| uint8_t buf1[bufferSize]; | ||
| volatile int head1 = 0, tail1 = 0; |
There was a problem hiding this comment.
head1/tail1 are volatile int and accessed from both loop() and ISR(TIMER3_COMPA_vect). On AVR, int is 16-bit and not atomically updated, which can corrupt the ring buffer under interrupt. Prefer volatile uint8_t indices (bufferSize=64) or wrap accesses in an atomic block.
| volatile int head1 = 0, tail1 = 0; | |
| volatile uint8_t head1 = 0, tail1 = 0; |
| ### Week 4 (26 - 1 feb) | ||
| **Scenografie + test the installation** | ||
| - Solder everything together | ||
| - ~~wirte the whole python logic (Monday)~~ |
There was a problem hiding this comment.
Typo: “wirte” should be “write”.
| - ~~wirte the whole python logic (Monday)~~ | |
| - ~~write the whole python logic (Monday)~~ |
| --- | ||
| import piGettingStarted from '../../assets/videos/20260117-pi-getting-started.MOV?url'; | ||
| import piGettingStarted from '../../assets/videos/20260117-pi-getting-started.mp4?url'; |
There was a problem hiding this comment.
Now that the post imports the .mp4 version, the old .MOV asset appears to be unreferenced. Consider removing the unused .MOV to reduce repo size (or keep originals in a separate source-assets location).
No description provided.