So far, so good. My diagram has the same components as the example, in basically the same arrangement. Obviously the pin assignments and other inconsequentials are different, but don’t we all prefer our own variable naming schemas?

There were a few things that were still non-specific – “blink the LED” translated to blink yellow 5 times with red still lit. I felt like that could have been spelled out clearer up front, but whatever. My circuit worked fine, as did my Sketch. Eventually. I also drove myself to distraction a few times at the use of both “westward” and “west-facing” (e.g. eastward) in the instructions. It’s a tutorial, not a soliloquy; I prefer repetitive to needlessly over-complicated.

There was also a weird point on the delay. If the button triggers a reversal in traffic, the system is supposed to delay to allow in-progress crossings to complete. In the example sketch, they delay before they swap the lights to halt oncoming traffic. All well and good for anyone in the middle of the bridge when the delay is triggered, but it doesn’t prevent oncoming traffic from continuing to enter onto the bridge during that transition period and end up in somebody’s grill.

They also flip the flag too early for me – I don’t like to change the marker until the whole movement executes. I also used one if…else statement rather than two sets of nested ifs, and I only check for button presses when they matter, instead of checking each one to see if it matters (west button press has no effect if traffic is already moving westward).

Fussy as I am, I am enjoying the builds almost as much as the programming. And it’s been a great excuse to bust out the graph paper.


Visual Portfolio, Posts & Image Gallery for WordPress
Date 28 November 2023
Date 28 November 2023
Date 28 November 2023