velxio/frontend/src/components/velxio-components/Attiny85Element.ts

107 lines
4.4 KiB
TypeScript
Raw Normal View History

/**
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
* Attiny85Element.ts — DIP-8 ATtiny85 Web Component
*
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
* Visual: Fritzing-drawn ATtiny85 DIP package loaded as a static asset
* from /component-svgs/attiny85.svg. Original copied verbatim from
* third-party/fritzing-parts/svg/core/breadboard/ATtiny85_breadboard.svg
* (CC-BY-SA, see THIRDPARTY_LICENSES.md).
*
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
* Geometry note (different from the original hand-drawn version):
* The Fritzing layout puts the chip HORIZONTAL with 4 pins on the TOP
* edge and 4 pins on the BOTTOM edge — not vertical with pins on
* left/right like the older art. Existing wired examples will rewire
* automatically (the wire system reads coords by pin name from
* pinInfo) but external components positioned to the right of the
* chip may need to be moved manually for clean routing.
*
feat(attiny85+customchip): full ATtiny85 ADC/Timer0 + custom-chip pipeline fixes ATtiny85 (AVRSimulator + collectPinStates + connectAnalogInputsToMcu + SimulatorCanvas + Attiny85Element + examples): - Add attiny85AdcConfig with correct register addresses (ADMUX=0x27, ADCSRA=0x26, ADCSRB=0x23, ADCL=0x24, ADCH=0x25, DIDR0=0x34, adcInterrupt=0x08). Without this, analogRead() polled the wrong address forever and the firmware hung on first ADC read. - Add attiny85Timer0Config + instantiate AVRTimer so OVF fires at the ATTinyCore-expected ~1.024 ms cadence. delay() advance is still blocked on avr8js TIFR auto-clear semantics (separate upstream issue, see ATTINY85_TIMER0_UPSTREAM_ISSUE.md in velxio-prod test plan). - Map ATtiny85 ADC channels to PB-style pin names (PB5/PB2/PB4/PB3 -> 0..3) in connectAnalogInputsToMcu so SPICE node voltages reach the right ADC channel. - Recognise /^PB\d+$/ in collectPinStates.pinNameToArduinoPin so wires named "PB1" emit v_attiny85_pb1 V-source and the LED responds to MCU writes. Previously every PB-wire returned -1 and SPICE saw no source. - SimulatorCanvas: subscribe pin 1 (PB1) for the built-in LED on the attiny85 board kind (Digispark convention), instead of falling through to the pin-13 default. - Attiny85Element: remove the hand-drawn "yellow LED" circle that was floating above the chip. The bare DIP-8 has no on-board LED; examples wire a real wokwi-led + resistor instead. - examples.ts: add a real wokwi-led + 220 Ohm wokwi-resistor + wires to attiny85-blink, and add missing series resistors to attiny85-button-led and attiny85-ntc-sensor. attiny85-pwm-fade was already correct. Custom-chip pipeline (CustomChipPart + simulatorBridges): - Add a requestAnimationFrame loop that calls instance.tickTimers() every frame in CustomChipPart. Chips that register vx_timer_create (e.g. an i8080 stepping its core, or a sensor publishing samples) had timers added to the queue but nothing fired them; tickTimers was dead code. - Gate the ESP32 backend path with detectSimulatorKind(sim)==='esp32'. The previous `typeof sim.registerSensor === 'function'` check matched AVR and RP2040 simulators too (they expose registerSensor for I2C sensor proxies), routing client-side chips to a non-existent ESP32 worker on those boards. - Replace direct simulator.usart.writeByte calls in avrUartTx with a JS-level FIFO + setTimeout(1ms) drainer. avr8js writeByte drops bytes under burst load (a chip emitting print_string lost ~99% of bytes via non-immediate, or kept only the last byte via immediate). The drainer attempts one non-immediate write per tick and retries on RXC busy / RXEN off. Added a guard for ATtiny85 (no USART -> would queue forever). End-to-end verified: i8080-banner-streamer now prints the boot banner followed by "uptime ticks: 0xNN" lines stepping every ~50 ms, executing real Intel 8080 instructions inside the WASM chip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 04:10:08 +07:00
* viewBox 28.801 x 23.768 mm scaled uniformly at 5.555 px/mm -> 160 x 132 px.
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
* Pin terminal centres in the source SVG (mm), all 8 connectors:
* row x y pin label
* top 3.601 1.084 VCC (connector7)
* top 10.801 1.084 PB2 (connector6)
* top 18.000 1.084 PB1 (connector5)
* top 25.201 1.084 PB0 (connector4)
* bottom 3.601 22.687 PB5 (connector0, RST)
* bottom 10.801 22.687 PB3 (connector1)
* bottom 18.000 22.687 PB4 (connector2)
* bottom 25.201 22.687 GND (connector3)
*
feat(attiny85+customchip): full ATtiny85 ADC/Timer0 + custom-chip pipeline fixes ATtiny85 (AVRSimulator + collectPinStates + connectAnalogInputsToMcu + SimulatorCanvas + Attiny85Element + examples): - Add attiny85AdcConfig with correct register addresses (ADMUX=0x27, ADCSRA=0x26, ADCSRB=0x23, ADCL=0x24, ADCH=0x25, DIDR0=0x34, adcInterrupt=0x08). Without this, analogRead() polled the wrong address forever and the firmware hung on first ADC read. - Add attiny85Timer0Config + instantiate AVRTimer so OVF fires at the ATTinyCore-expected ~1.024 ms cadence. delay() advance is still blocked on avr8js TIFR auto-clear semantics (separate upstream issue, see ATTINY85_TIMER0_UPSTREAM_ISSUE.md in velxio-prod test plan). - Map ATtiny85 ADC channels to PB-style pin names (PB5/PB2/PB4/PB3 -> 0..3) in connectAnalogInputsToMcu so SPICE node voltages reach the right ADC channel. - Recognise /^PB\d+$/ in collectPinStates.pinNameToArduinoPin so wires named "PB1" emit v_attiny85_pb1 V-source and the LED responds to MCU writes. Previously every PB-wire returned -1 and SPICE saw no source. - SimulatorCanvas: subscribe pin 1 (PB1) for the built-in LED on the attiny85 board kind (Digispark convention), instead of falling through to the pin-13 default. - Attiny85Element: remove the hand-drawn "yellow LED" circle that was floating above the chip. The bare DIP-8 has no on-board LED; examples wire a real wokwi-led + resistor instead. - examples.ts: add a real wokwi-led + 220 Ohm wokwi-resistor + wires to attiny85-blink, and add missing series resistors to attiny85-button-led and attiny85-ntc-sensor. attiny85-pwm-fade was already correct. Custom-chip pipeline (CustomChipPart + simulatorBridges): - Add a requestAnimationFrame loop that calls instance.tickTimers() every frame in CustomChipPart. Chips that register vx_timer_create (e.g. an i8080 stepping its core, or a sensor publishing samples) had timers added to the queue but nothing fired them; tickTimers was dead code. - Gate the ESP32 backend path with detectSimulatorKind(sim)==='esp32'. The previous `typeof sim.registerSensor === 'function'` check matched AVR and RP2040 simulators too (they expose registerSensor for I2C sensor proxies), routing client-side chips to a non-existent ESP32 worker on those boards. - Replace direct simulator.usart.writeByte calls in avrUartTx with a JS-level FIFO + setTimeout(1ms) drainer. avr8js writeByte drops bytes under burst load (a chip emitting print_string lost ~99% of bytes via non-immediate, or kept only the last byte via immediate). The drainer attempts one non-immediate write per tick and retries on RXC busy / RXEN off. Added a guard for ATtiny85 (no USART -> would queue forever). End-to-end verified: i8080-banner-streamer now prints the boot banner followed by "uptime ticks: 0xNN" lines stepping every ~50 ms, executing real Intel 8080 instructions inside the WASM chip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 04:10:08 +07:00
* No fake on-board LED is drawn. The bare DIP-8 has no PCB LED — examples
* wire a real wokwi-led + wokwi-resistor to PB1 like the c3-blink one does.
*/
const W = 160;
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
const H = 132;
const TOP_Y = 6; // CSS px — y of all four top-edge pin tips
const BOT_Y = 126; // CSS px — y of all four bottom-edge pin tips
const PIN_X = [20, 60, 100, 140] as const;
const PIN_INFO: ReadonlyArray<{ name: string; x: number; y: number; description?: string }> = [
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
// Top row — left to right
{ name: 'VCC', x: PIN_X[0], y: TOP_Y, description: 'VCC (Pin 8)' },
{ name: 'PB2', x: PIN_X[1], y: TOP_Y, description: 'PB2 / SCK / SCL / ADC1 (Pin 7)' },
feat(attiny85+customchip): full ATtiny85 ADC/Timer0 + custom-chip pipeline fixes ATtiny85 (AVRSimulator + collectPinStates + connectAnalogInputsToMcu + SimulatorCanvas + Attiny85Element + examples): - Add attiny85AdcConfig with correct register addresses (ADMUX=0x27, ADCSRA=0x26, ADCSRB=0x23, ADCL=0x24, ADCH=0x25, DIDR0=0x34, adcInterrupt=0x08). Without this, analogRead() polled the wrong address forever and the firmware hung on first ADC read. - Add attiny85Timer0Config + instantiate AVRTimer so OVF fires at the ATTinyCore-expected ~1.024 ms cadence. delay() advance is still blocked on avr8js TIFR auto-clear semantics (separate upstream issue, see ATTINY85_TIMER0_UPSTREAM_ISSUE.md in velxio-prod test plan). - Map ATtiny85 ADC channels to PB-style pin names (PB5/PB2/PB4/PB3 -> 0..3) in connectAnalogInputsToMcu so SPICE node voltages reach the right ADC channel. - Recognise /^PB\d+$/ in collectPinStates.pinNameToArduinoPin so wires named "PB1" emit v_attiny85_pb1 V-source and the LED responds to MCU writes. Previously every PB-wire returned -1 and SPICE saw no source. - SimulatorCanvas: subscribe pin 1 (PB1) for the built-in LED on the attiny85 board kind (Digispark convention), instead of falling through to the pin-13 default. - Attiny85Element: remove the hand-drawn "yellow LED" circle that was floating above the chip. The bare DIP-8 has no on-board LED; examples wire a real wokwi-led + resistor instead. - examples.ts: add a real wokwi-led + 220 Ohm wokwi-resistor + wires to attiny85-blink, and add missing series resistors to attiny85-button-led and attiny85-ntc-sensor. attiny85-pwm-fade was already correct. Custom-chip pipeline (CustomChipPart + simulatorBridges): - Add a requestAnimationFrame loop that calls instance.tickTimers() every frame in CustomChipPart. Chips that register vx_timer_create (e.g. an i8080 stepping its core, or a sensor publishing samples) had timers added to the queue but nothing fired them; tickTimers was dead code. - Gate the ESP32 backend path with detectSimulatorKind(sim)==='esp32'. The previous `typeof sim.registerSensor === 'function'` check matched AVR and RP2040 simulators too (they expose registerSensor for I2C sensor proxies), routing client-side chips to a non-existent ESP32 worker on those boards. - Replace direct simulator.usart.writeByte calls in avrUartTx with a JS-level FIFO + setTimeout(1ms) drainer. avr8js writeByte drops bytes under burst load (a chip emitting print_string lost ~99% of bytes via non-immediate, or kept only the last byte via immediate). The drainer attempts one non-immediate write per tick and retries on RXC busy / RXEN off. Added a guard for ATtiny85 (no USART -> would queue forever). End-to-end verified: i8080-banner-streamer now prints the boot banner followed by "uptime ticks: 0xNN" lines stepping every ~50 ms, executing real Intel 8080 instructions inside the WASM chip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 04:10:08 +07:00
{ name: 'PB1', x: PIN_X[2], y: TOP_Y, description: 'PB1 / MISO / OC0B / OC1A (Pin 6)' },
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
{ name: 'PB0', x: PIN_X[3], y: TOP_Y, description: 'PB0 / MOSI / SDA / OC0A (Pin 5)' },
// Bottom row — left to right
{ name: 'PB5', x: PIN_X[0], y: BOT_Y, description: 'PB5 / RESET (Pin 1)' },
{ name: 'PB3', x: PIN_X[1], y: BOT_Y, description: 'PB3 / XTAL1 / ADC3 (Pin 2)' },
{ name: 'PB4', x: PIN_X[2], y: BOT_Y, description: 'PB4 / XTAL2 / ADC2 (Pin 3)' },
{ name: 'GND', x: PIN_X[3], y: BOT_Y, description: 'GND (Pin 4)' },
];
class Attiny85Element extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
}
connectedCallback() {
this.render();
}
/** Wires use this to find pin coordinates. */
get pinInfo() {
return PIN_INFO;
}
private render() {
if (!this.shadowRoot) return;
this.shadowRoot.innerHTML = `
<style>
:host { display: inline-block; line-height: 0; }
svg { display: block; overflow: visible; }
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
.pin-label {
font: 600 7px monospace;
fill: #cdf;
text-anchor: middle;
pointer-events: none;
}
.pin-label.power { fill: #aaa; }
</style>
<svg width="${W}" height="${H}" viewBox="0 0 ${W} ${H}">
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
<!-- Fritzing ATtiny85 DIP-8 artwork (CC-BY-SA). Scaled to fill
feat(attiny85+customchip): full ATtiny85 ADC/Timer0 + custom-chip pipeline fixes ATtiny85 (AVRSimulator + collectPinStates + connectAnalogInputsToMcu + SimulatorCanvas + Attiny85Element + examples): - Add attiny85AdcConfig with correct register addresses (ADMUX=0x27, ADCSRA=0x26, ADCSRB=0x23, ADCL=0x24, ADCH=0x25, DIDR0=0x34, adcInterrupt=0x08). Without this, analogRead() polled the wrong address forever and the firmware hung on first ADC read. - Add attiny85Timer0Config + instantiate AVRTimer so OVF fires at the ATTinyCore-expected ~1.024 ms cadence. delay() advance is still blocked on avr8js TIFR auto-clear semantics (separate upstream issue, see ATTINY85_TIMER0_UPSTREAM_ISSUE.md in velxio-prod test plan). - Map ATtiny85 ADC channels to PB-style pin names (PB5/PB2/PB4/PB3 -> 0..3) in connectAnalogInputsToMcu so SPICE node voltages reach the right ADC channel. - Recognise /^PB\d+$/ in collectPinStates.pinNameToArduinoPin so wires named "PB1" emit v_attiny85_pb1 V-source and the LED responds to MCU writes. Previously every PB-wire returned -1 and SPICE saw no source. - SimulatorCanvas: subscribe pin 1 (PB1) for the built-in LED on the attiny85 board kind (Digispark convention), instead of falling through to the pin-13 default. - Attiny85Element: remove the hand-drawn "yellow LED" circle that was floating above the chip. The bare DIP-8 has no on-board LED; examples wire a real wokwi-led + resistor instead. - examples.ts: add a real wokwi-led + 220 Ohm wokwi-resistor + wires to attiny85-blink, and add missing series resistors to attiny85-button-led and attiny85-ntc-sensor. attiny85-pwm-fade was already correct. Custom-chip pipeline (CustomChipPart + simulatorBridges): - Add a requestAnimationFrame loop that calls instance.tickTimers() every frame in CustomChipPart. Chips that register vx_timer_create (e.g. an i8080 stepping its core, or a sensor publishing samples) had timers added to the queue but nothing fired them; tickTimers was dead code. - Gate the ESP32 backend path with detectSimulatorKind(sim)==='esp32'. The previous `typeof sim.registerSensor === 'function'` check matched AVR and RP2040 simulators too (they expose registerSensor for I2C sensor proxies), routing client-side chips to a non-existent ESP32 worker on those boards. - Replace direct simulator.usart.writeByte calls in avrUartTx with a JS-level FIFO + setTimeout(1ms) drainer. avr8js writeByte drops bytes under burst load (a chip emitting print_string lost ~99% of bytes via non-immediate, or kept only the last byte via immediate). The drainer attempts one non-immediate write per tick and retries on RXC busy / RXEN off. Added a guard for ATtiny85 (no USART -> would queue forever). End-to-end verified: i8080-banner-streamer now prints the boot banner followed by "uptime ticks: 0xNN" lines stepping every ~50 ms, executing real Intel 8080 instructions inside the WASM chip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 04:10:08 +07:00
the 160x132 box; aspect ratio matches the source 1.211:1. -->
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
<image href="/component-svgs/attiny85.svg" x="0" y="0" width="${W}" height="${H}" />
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
<!-- Pin labels overlaid above/below the connector pads. -->
<text class="pin-label power" x="${PIN_X[0]}" y="${TOP_Y - 22}">VCC</text>
<text class="pin-label" x="${PIN_X[1]}" y="${TOP_Y - 22}">PB2</text>
feat(attiny85+customchip): full ATtiny85 ADC/Timer0 + custom-chip pipeline fixes ATtiny85 (AVRSimulator + collectPinStates + connectAnalogInputsToMcu + SimulatorCanvas + Attiny85Element + examples): - Add attiny85AdcConfig with correct register addresses (ADMUX=0x27, ADCSRA=0x26, ADCSRB=0x23, ADCL=0x24, ADCH=0x25, DIDR0=0x34, adcInterrupt=0x08). Without this, analogRead() polled the wrong address forever and the firmware hung on first ADC read. - Add attiny85Timer0Config + instantiate AVRTimer so OVF fires at the ATTinyCore-expected ~1.024 ms cadence. delay() advance is still blocked on avr8js TIFR auto-clear semantics (separate upstream issue, see ATTINY85_TIMER0_UPSTREAM_ISSUE.md in velxio-prod test plan). - Map ATtiny85 ADC channels to PB-style pin names (PB5/PB2/PB4/PB3 -> 0..3) in connectAnalogInputsToMcu so SPICE node voltages reach the right ADC channel. - Recognise /^PB\d+$/ in collectPinStates.pinNameToArduinoPin so wires named "PB1" emit v_attiny85_pb1 V-source and the LED responds to MCU writes. Previously every PB-wire returned -1 and SPICE saw no source. - SimulatorCanvas: subscribe pin 1 (PB1) for the built-in LED on the attiny85 board kind (Digispark convention), instead of falling through to the pin-13 default. - Attiny85Element: remove the hand-drawn "yellow LED" circle that was floating above the chip. The bare DIP-8 has no on-board LED; examples wire a real wokwi-led + resistor instead. - examples.ts: add a real wokwi-led + 220 Ohm wokwi-resistor + wires to attiny85-blink, and add missing series resistors to attiny85-button-led and attiny85-ntc-sensor. attiny85-pwm-fade was already correct. Custom-chip pipeline (CustomChipPart + simulatorBridges): - Add a requestAnimationFrame loop that calls instance.tickTimers() every frame in CustomChipPart. Chips that register vx_timer_create (e.g. an i8080 stepping its core, or a sensor publishing samples) had timers added to the queue but nothing fired them; tickTimers was dead code. - Gate the ESP32 backend path with detectSimulatorKind(sim)==='esp32'. The previous `typeof sim.registerSensor === 'function'` check matched AVR and RP2040 simulators too (they expose registerSensor for I2C sensor proxies), routing client-side chips to a non-existent ESP32 worker on those boards. - Replace direct simulator.usart.writeByte calls in avrUartTx with a JS-level FIFO + setTimeout(1ms) drainer. avr8js writeByte drops bytes under burst load (a chip emitting print_string lost ~99% of bytes via non-immediate, or kept only the last byte via immediate). The drainer attempts one non-immediate write per tick and retries on RXC busy / RXEN off. Added a guard for ATtiny85 (no USART -> would queue forever). End-to-end verified: i8080-banner-streamer now prints the boot banner followed by "uptime ticks: 0xNN" lines stepping every ~50 ms, executing real Intel 8080 instructions inside the WASM chip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 04:10:08 +07:00
<text class="pin-label" x="${PIN_X[2]}" y="${TOP_Y - 22}">PB1</text>
feat(components): swap BMP280 + ATtiny85 to fritzing art The hand-drawn SVGs in Bmp280Element.ts and Attiny85Element.ts were functional but obviously amateur next to a real Fritzing-drawn part. Both components now mount the equivalent Fritzing breadboard SVG as a public static asset (`<image href>` in the shadow DOM SVG), with pin coordinates remapped to the new artwork and pin-name labels overlaid on top so the user can still read each connector at a glance. frontend/public/component-svgs/bmp280.svg (new) Verbatim copy of third-party/fritzing-parts/svg/core/breadboard/ bmp180_breadboard.svg. The Adafruit BMP180 breakout is the mechanically identical Bosch predecessor — same I2C interface, same 4-pin pinout. Pin labels lifted from the matching .fzp. frontend/public/component-svgs/attiny85.svg (new) Verbatim copy of the Fritzing ATtiny85 DIP-8 breadboard art. Bmp280Element.ts Width 80×100 px (Fritzing aspect 28.35:35.43 ≈ 0.8:1, exact uniform scale of 2.822 px/mm). Pin coords for SDA / SCL / GND / VCC matched to the connector centres in the source SVG. Pin labels overlaid on top. Existing wired example (esp32-bmp280) re-routes automatically because the wire system reads coords by pin name from pinInfo. Attiny85Element.ts Width 160×132 px (Fritzing aspect 28.801:23.768 ≈ 1.21:1, exact uniform scale of 5.555 px/mm). The Fritzing layout puts pins on the TOP and BOTTOM edges (4 each), not LEFT and RIGHT like the older hand-drawn version. Pin coords land on clean numbers (x ∈ {20, 60, 100, 140}, y ∈ {6, 126}). Built-in LED on PB1 stays as an overlaid circle outside the chip body. Wires in the existing attiny85-* examples re-route automatically by pin name; external components positioned to the right of the chip may need a manual nudge for clean routing — but they work. frontend/src/components/simulator/BoardOnCanvas.tsx attiny85: { w: 160, h: 100 } → { w: 160, h: 132 } to match the new aspect ratio. Same width as before so the chip occupies the same horizontal slot in existing example layouts. scripts/component-overrides.json BMP280 thumbnail updated to mirror the Fritzing colour scheme (dark blue PCB, BMP180 silkscreen, four gold connector circles) so picker and canvas feel consistent. frontend/public/components-metadata.json Regenerated. docs/THIRD_PARTY.md New "Fritzing parts library" section. Both new assets are listed with their upstream paths plus the CC-BY-SA licence and link to the parts repo. Future Fritzing copies must be added there too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 09:06:44 +07:00
<text class="pin-label" x="${PIN_X[3]}" y="${TOP_Y - 22}">PB0</text>
<text class="pin-label" x="${PIN_X[0]}" y="${BOT_Y + 12}">PB5</text>
<text class="pin-label" x="${PIN_X[1]}" y="${BOT_Y + 12}">PB3</text>
<text class="pin-label" x="${PIN_X[2]}" y="${BOT_Y + 12}">PB4</text>
<text class="pin-label power" x="${PIN_X[3]}" y="${BOT_Y + 12}">GND</text>
</svg>
`;
}
}
if (!customElements.get('velxio-attiny85')) {
customElements.define('velxio-attiny85', Attiny85Element);
}
export {};