Silicon ChipArduino Bootcamp – Part 11 - November 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter: Upping your electronics housing game
  7. Feature: Where’s my pneumatic car? by Max the Magnificent
  8. Feature: Net Work by Alan Winstanley
  9. Feature: The Fox Report by Barry Fox
  10. Project: LC Meter Mk3 by Charles Kosina
  11. Project: DC Supply Filter for vehicles by John Clarke
  12. Project: PM (particulate matter) ‘Dust’ Sensors by Jim Rowe
  13. Project: Anodising Aluminium at home by Phil Prosser
  14. Feature: Arduino Bootcamp – Part 11 by Max’s Cool Beans
  15. Feature: Circuit Surgery by Ian Bell
  16. Feature: AUDIO OUT by Jake Rothman
  17. Project: Electronic Building Blocks by Julian Edgar
  18. PCB Order Form
  19. Advertising Index

This is only a preview of the November 2023 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Items relevant to "Stewart of Reading":
  • Bookshelf Speaker Passive Crossover PCB [01101201] (AUD $10.00)
  • Bookshelf Speaker Subwoofer Active Crossover PCB [01101202] (AUD $7.50)
  • Bookshelf Speaker Passive and Active Crossover PCB patterns (PDF download) [01101201-2] (Free)
  • Bookshelf Speaker System timber and metal cutting diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Easy-to-build Bookshelf Speaker System (January 2020)
  • Building the new “bookshelf” stereo speakers, Pt 2 (February 2020)
  • Building Subwoofers for our new “Bookshelf” Speakers (March 2020)
  • Stewart of Reading (October 2023)
  • Stewart of Reading (November 2023)
  • ETI BUNDLE (December 2023)
  • Active Subwoofer For Hi-Fi at Home (January 2024)
  • Active Subwoofer For Hi-Fi at Home (February 2024)
Max’s Cool Beans By Max the Magnificent Arduino Bootcamp – Part 11 H ello there. I hope you’re having as much fun as I wish I was having. I’m currently cursing myself for a fool because we closed my previous column (PE, October 2023) with me giving you some homework projects. Not that there’s anything wrong with that, per se. The more, the merrier, if anything. The problem is that I foolishly said: ‘We’ll compare results when next we meet,’ which means I must also do these projects myself. Rats! Building the excitement Before we plunge into the fray with gusto and abandon (and aplomb, of course), let’s briefly discuss what we’re going to do in this column and our next column, in addition to completing our previous column’s homework assignments. In the context of our discussions here, we understand sensors to be devices that produce output signals (voltages or currents) corresponding to physical phenomena in the real world (light, heat, humidity, motion, pressure…). We can feed these signals into a microcontroller unit (MCU) like the Arduino Uno we’ve been using for our experiments, and then use them as the basis for decisions and actions. Speaking of actions, actuators are devices that produce some form of motion (rotary or linear) that can be used to move and control a mechanism or system – for example, opening a valve. Actuators can be electric (eg, various flavours of motors), hydraulic, pneumatic, piezoelectric, magnetic… the list goes on. When we come to think about it, it becomes apparent that our piezoelectric buzzer is a simple form of actuator, as is any loudspeaker. Also, we have display devices, which can be as simple as a single light-emitting diode (LED), slightly more complicated like our 7-segment display, all the way up to mindboggling holographic displays. (As I always say, ‘Show me a flashing LED, and I’ll show you a man drooling.’) In previous columns we’ve experimented with simple sensors in the form of pushbutton switches and potentiometers. What we are poised to do in our next column is add sensors to detect ambient light and distance. In addition to controlling the frequency of our piezoelectric buzzer, we are going to use the values from our sensors to control various aspects of our 7-segment display device, including the frequency of a flashing segment, the value being displayed, and the intensity (brightness) of the display. The terms ‘gazintas’ (or ‘gazins’) and ‘gazoutas’ (or ‘gazouts’) are humorous pronunciation spellings of ‘goes into’ and ‘goes Gazins Gazouts Potentiometer Piezoelectric Buzzer (Rotation) Light-Dependent Resistor (LDR) (Ambient Light) Ultrasonic Sensor (Distance) Fig.1. Gazins and Gazouts. 44 Listing 1. Where we left things last time. out of,’ respectively. Bearing this in mind, we can summarise the contents of this column and our next as illustrated in Fig.1. Setting the scene Just to ensure we’re all tapdancing to the same skirl of the bagpipes, let’s briefly refresh our memories as to where we last left off. We started by adding a potentiometer (pot) called a trimpot (trimmer pot) to our breadboard (Fig.2). You know the drill by now. All the files mentioned in this column are available from the November 2023 page of the PE website (https://bit.ly/pe-downloads). As usual, you can download an image of our current breadboard layout showing 5V Pot 10kΩ 10kΩ A0 A1 10kΩ Translucent view showing the pins underneath SW0 (Frequency) Arduino Uno 7-Segment Display) (Flash Rate) (Numerical Value) (Brightness/Intensity) A2 SW1 GND To the Arduino’s A0 analogue pin To the Arduino’s A1 analogue pin New Existing momentary pushbutton switches potentiometer To the Arduino’s A2 analogue pin Fig.2. Adding the trimpot to the breadboard. Practical Electronics | November | 2023 =========== Trimpot = 2 Trimpot = 2 Trimpot = 3 Trimpot = 4 Trimpot = 4 : Listing 2. A cheap and cheerful test program. the switches, our trimpot, our piezoelectric buzzer, and our 7-segment display – along with various pull-up and currentlimiting resistors – coupled with the connections to our Arduino Uno (file CB-Nov23-01.pdf). As you may recall, we commenced by writing a program to loop around reading values from the trimpot and presenting these values in the Serial Monitor on our host computer. Since the Arduino Uno’s analogue inputs are processed using an internal 10-bit analogue-to-digital converter (ADC), and since 10 bits can code 210 = 1024 patterns of 0s and 1s, the values we see from the trimpot range between 0 and 1023. The final version of our program employed the Arduino’s built-in map() function to map this 0 to 1023 range of values to a new 0 to 5 range, which we said we were going to regard as representing voltages between 0V and 5V rounded to the nearest volt. You can peruse and ponder this program in its entirety in Listing 1 (file CB-Nov23-02.txt). On Line 3 we declare a global integer variable called PinPot, which we assign to the Arduino’s analogue pin A2. This is the pin that’s connected to the trimpot on our breadboard. One question you might be asking yourself is why we aren’t calling the Arduino’s built-in pinMode() function in our setup() function to specify whether we are going to use PinPot as an input or an output. The answer is that we are going to be using PinPot as an analogue input, and we need to use the pinMode() function only for pins we intend to employ as digital inputs and outputs. The only really interesting thing in our setup() function occurs on Line 7 when we initialise the serial communications to allow the Arduino to ‘talk’ to our host computer and display information in the Serial Monitor (the use of the Serial Monitor was discussed in PE, May 2023 and October 2023). Our loop() function is also easy peasy lemon squeezy. On Line 16 we declare an integer variable called valPot (‘value from the potentiometer’). On Line 18 we assign the value returned from calling the Arduino’s built-in analogRead() function to our valPot variable. On Line 19 we call the Arduino’s built-in map() function to map one range of values (the 0 to 1023 values we read from our trimpot, in this example) into another range of values (0 to 5 in this example). Then we use Lines 20 and 21 to display our new values in the Serial Monitor. As we tweak the position of our trimpot, the result will look something like the following: Practical Electronics | November | 2023 What did you expect? To be honest, the code in Listing 1 might not behave quite the way you expect. Of course, this all depends on what you do expect. Take a moment to ponder and predict what the map() function will return when presented with our 0 to 1023 range of trimpot readings. The easiest way to determine what actually happens in the real world is to whip up a quick-and-easy test program, as seen in Listing 2 (file CB-Nov23-03.txt). All we are doing here is cycling an integer variable called i from 0 to 1023 to simulate the range of values we expect from our trimpot, mapping these values onto a range from 0 to 5, assigning these new values to an integer variable called j, and printing the i and j values in the Serial Monitor on our host computer. If we run this program, we discover the following: i = 0 to 204 i = 205 to 409 i = 410 to 613 i = 614 to 818 i = 819 to 1022 i = 1023 j = 0 j = 1 j = 2 j = 3 j = 4 j = 5 Is this what you expected? Is this what we want? One clue is when I said: ‘[…] a new 0 to 5 range, which we can regard as representing voltages between 0V and 5V rounded to the nearest volt.’ To be honest, I was a little naughty here because I didn’t define what we meant by rounding in this context, and there are many different rounding algorithms to choose from. You were probably expecting a ‘round-half-even’ implementation, but what we see here is a ‘round-toward-zero’ approach (visit the article I wrote at: https://bit.ly/3PlIF3f to learn more about different rounding algorithms). Homework assignment #1 Our first homework assignment was to modify our latest program such that it displays voltage values with two significant fractional digits, such as 0.00, 1.41, 3.30, 4.99 and 5.00. Why don’t you take a moment to think how you would do this, and then compare your solution to mine as follows. First, I modified the call to the map() function. I left the input range as 0 to 1023 to reflect the values from our trimpot, but I changed the output range to 0 to 500. Second, as opposed to simply outputting the value of valPot (Line 21 in Listing 1), I implemented a primitive formatting algorithm, as seen in Listing 3 (the entire program is available in file CB-Nov23-04.txt). Remember that we want to see our voltage values displayed in the range 0.00V to 5.00V. This is what our algorithm does. If the value read and mapped from our potentiometer is less than 100 (1V), as tested on line 22, then we output a ‘0’ character (Line 24). Otherwise, we output the value divided by 100 (Line 2), which equates to the most significant digit (the ‘hundreds’ digit) in our 3-digit value (remember that the division operator ‘/’ truncates or discards any remainder), after which we use the modulo operator (% on line 29) to get rid of the most significant digit, leaving the remainder, which will have a value of 0 to 99. After printing a full stop ‘.’ (Line 31), we perform a similar exercise to output the ‘tens’ digit (Lines 33 to 41). Finally, we print the ‘ones’ digit (Line 42), after which we add a ‘V’ character to signify that we are considering these values to represent voltages. 45 to the delay() function that employed this definition at the end of our loop() function. Next, we’re going to declare a global integer variable called OldPot and assign it a value of –1 (this value guarantees that the first time we compare it to the value we read from our trimpot, we know for sure they won’t be the same. Finally, we’re going to modify our loop() function as shown in Listing 4 (file CB-Nov23-06.txt). As we see, we still read the value from the trimpot (Line 18) and map it to our desired range of values (Line 19). The only thing that changes is that we now perform a test (Line 21) to see if the new value we just read (stored in our local valPot variable) differs from the previous value we read (stored in our global OldPot variable). If there is a difference, we update our OldPot variable to reflect this new value (Line 23), after which we employ our existing formatting algorithm to output the new value. Listing 3. A primitive formatting algorithm. Does this work? Like a charm! Try loading and running this program on your own Arduino Uno, vary the position of the trimpot on your breadboard, and observe the results being displayed in your Serial Monitor. Alternatively, if you are just reading along, but you haven’t yet implemented this circuit on your breadboard, then you can load a modified version of the program shown in Listing 2, where this new version implements our primitive formatting algorithm (file CB-Nov23-05.txt). As you’ll see, the results are just the way we want to see them: i = i = i = i = i = i = i = 0 1 2 3 4 5 6 j = 0.00V j = 0.00V j = 0.00V j = 0.01V j = 0.01V j = 0.02V j = 0.02V : i = 1017 i = 1018 i = 1019 i = 1020 i = 1021 i = 1022 i = 1023 j = 4.97V j = 4.97V j = 4.98V j = 4.98V j = 4.99V j = 4.99V j = 5.00V WTW? ‘What the What (WTW)?’ is one of my new favorite expressions. The whole purpose of the latest incarnation of our program is to prevent numerous lines being written to our Serial Monitor. I don’t know what you are seeing, but it’s certainly not working in my case. I started off with my trimpot roughly in its center position. The output in my serial monitor looks like the following: ================ Trimpot = 2.50V Trimpot = 2.49V Trimpot = 2.50V Trimpot = 2.49V Trimpot = 2.50V Trimpot = 2.49V ‘What can be causing this travesty?’ I hear you cry. Well, here’s the deal. When we read from a digital input, the value is (hopefully) a hard 0 or a hard 1. By comparison, in the case of an analogue input, the signal being fed into the input is subject to various sources of noise. As a result, every time we read the analogue input, it’s value can vary a little one way or the other. There are various possible solutions to this issue. In hardware, for example, we might try adding a capacitor to the input. However, my box of capacitors is all the way across the room, and I don’t feel like getting up at this moment in time. The simplest software solution is to modify the test in Line 21 of Listing 4. As opposed to our current test… if (valPot != OldPot) When you think about it, we’ve essentially created a simple voltmeter, which should set all sorts of random thoughts rattling around our noggins. Homework assignment #2 One of the things that bugs me about our current program is that we are constantly writing new values to the Serial Monitor. Most of the time this is a waste of time because we only occasionally change the position of our potentiometer. This explains our second homework assignment, which was to modify the program such that it only displays a new value in the Serial Monitor if the voltage changes by 0.01V or more. Let’s work with the latest and greatest version of our program (file CB-Nov23-04.txt). We are going to remove the PAUSE_ BETWEEN_SAMPLES definition on Line 1 along with the call 46 Listing 4. Only output if something changes. Practical Electronics | November | 2023 GND G F 10 9 8 A B 7 6 Multiple anodes A F B 7 6 4 2 1 9 10 5 A B C D E F G DP G E C D 1 2 E D 3 GND DP 4 3,8 5 Common cathode C DP GND Fig.3. Our common-cathode 7-segment display. …which we can read as: ‘If the new value on the pot is not equal to the old value on the pot,’ we can change this to the following… Just for giggles and grins, we are going to flash the ‘D’ segment at the bottom of the display (Fig.3). This is pin 2 on the display, and it’s connected to digital pin 6 on our Arduino Uno (see the circuit diagram in file CB-Nov23-01.pdf). Let’s say that a mapped value of 0 from our trimpot causes the slowest flash (one second on and one second off), and that we progress in 1/10th second (0.1s, 100ms (milliseconds)) increments to a mapped value of 9 from our trimpot, which causes the fastest flash (1/10 second on and 1/10 second off). What we’re going to do is use our original program from Listing 1 as a starting point, along with a few of the changes we’ve made along the way, like only outputting new values to the serial monitor. Also, we’re going to flash segment D on the 7-segment display. Before we do this, however, we need to make a decision regarding our use of the Arduino’s built-in map() function. Based on our earlier discussions, we now know that this won’t ideally serve our purposes with respect to what we are trying to do here. What we really want to see is something like the following: if ( abs(valPot - OldPot) > 1 ) …which we can read as: ‘if the absolute value of the difference between the new value in the pot and the old value on the pot is greater than 1.’ How does this work? Well, if we subtract our old pot value from our new pot value, we could end up with a positive number, a negative number, or 0. The Arduino’s built-in abs() function returns the absolute value of a number; that is, the number without its sign. What this means is that abs(+2) and abs(-2) will both return 2, for example. As an aside, when we think about it, in this case it doesn’t matter whether we subtract the old value on the pot from the new value, or vice versa, because the result returned from the abs() function will be the same. When I run this ‘tweaked’ version of the program (file CB-Nov23-07.txt), I see the following, which stays the same until I change the position of my pot. ================ Trimpot = 2.50V I feel a small ‘Tra-la!’ is in order. Taking a break I don’t know about you, but I don’t like homework, so let’s take a little break. What we are going to do is map the 0 to 1023 input values read from our trimpot onto a range of 0 to 9 and – in addition to writing these values to the Serial Monitor – use these values to control the speed of a flashing segment on our 7-segment display. Listing 5. Our own mapping function. Practical Electronics | November | 2023 --Trimpot-0 to 102 103 to 204 205 to 306 307 to 408 409 to 510 511 to 612 613 to 714 715 to 816 817 to 918 919 to 1023 Map 0 1 2 3 4 5 6 7 8 9 One way to achieve this is to create our own mapping function called MyMap() as illustrated in Listing 5. Now let’s look at the main body of our new program to vary the speed of flashing segment D, as shown in Listing 6 (file CB-Nov23-08.txt). There’s nothing here that we’ve not seen before in one form or another. On Line 1 we define the value associated with our slowest flash, BASE, which we will use to flash our segment 1 second on and 1 second off. On Line 2 we declare DELTA, the incremental difference between flash durations as being 100ms. In addition to declaring the pin connected to our pot on Line 4, we also declare the pin connected to segment D of the 7-segment display on Line 5. Observe that, in this case, since this is a digital pin that we wish to use as an output, we call the pinMode() function on Line 13 and then we drive this output to 0 (thereby turning the segment off) on Line 14. Our loop() function starts off the way it did before, except it now calls our new MyMap() function on Line 27. We use Lines 29 to 34 to write the mapped value from our trimpot to the Serial Monitor. On Line 36, we declare an integer called flash to which we assign the result from a simple calculation that determines the delay we wish to use to flash our segment based on the mapped value from our trimpot. Finally, on Lines 37 to 40 we turn the segment on, pause, turn the segment off again, pause once more, and ‘Bob’s your uncle’ (or aunt, depending on your family dynamic). Load this program into your Arduino and observe how the rate of flash varies with the position of the trimpot. I know this is all simple stuff, but I still feel a glow of satisfaction when I see things working as planned (especially when a flashing LED is involved). Blinded by the light Do you have an LED-based alarm clock in your bedroom? If so, then assuming it’s not the cheapest version you could lay your hands on, when you turn the room lights off at night, 47 A F G B E DP D C AREF GND 13 12 ~11 ~10 ~9 8 7 ~6 ~5 4 ~3 2 TX-1 RX-0 To buzzer DIGITAL IN /OUT (PWM ~) GND 5V From Arduino Fig.4. The Arduino Uno’s PWM pins. the brightness of the clock’s display should automatically reduce accordingly. One way to detect the level of ambient light is to use a component called a light-dependent resistor (LDR). This is one of the sensors with which we will be experimenting in next month’s column. Also, just to give you a sneak peak of what’s heading our way in future columns, we are going to gather everything we’ve learned thus far (along with a bunch more stuff) to develop a suite of clocks using one, two, and four 7-segment displays. In addition to telling the time, we will be using our LDR to dim the displays at night, while our piezoelectric buzzer will provide chime and audible alarm functions. But we digress… Let’s stick with segment D on our 7-segment display for the moment. How can we control the brightness of this LED? Let’s take a step back and think about this for a moment. In our previous experiment we flashed segment D. When the segment is off, its brightness is 0%. When the segment is on, its brightness is 100%. Since we are flashing this segment fairly slowly in the scheme of things – using identical on and off times ranging from 1/10th of a second to a second – our eyes perceive these states as being fully on or fully off. Similarly, if we were using a light meter to measure the amount of light being emitted from the LED, we would see its reading oscillating between 0% and 100%. But suppose we were to average the light meter’s readings over some longer period, like an hour, for example. In this case, the average intensity would be only 50%. Hmmm. Suppose we repeatedly turn the LED on for 1ms and off for 1ms. In this case, the pulses will be far too fast for our eyes to detect individually. Instead, we will perceive the LED as running at 50% brightness. How about if we repeatedly turn the LED on for 1ms and off for 3ms? Since the LED is now on for only a quarter of the time, our eyes will perceive it as running at 25% brightness. Similarly, if we repeatedly turn the LED on for 3ms and off for 1ms, our eyes will perceive it as running at 75% brightness. One big problem with this solution is that the Ardunio would spend most of its time turning LEDs on and off, leaving little processing power to perform other activities. Fortunately, there is an alternative option. Arduinos include special hardware implementations of pulse-width modulation (PWM) functions associated with some of their digital pins. In the case of the Arduino Uno, there are six such pins (3, 5, 6, 9, 10, 11), indicated by ‘~’ characters on the board (Fig.4). 48 Happily, the digital pin we are using to drive segment D on the 7-segment display is pin 6, which is one of the pins that’s equipped with a PWM function (it’s almost as if we had a plan). The Arduino doesn’t have true analogue outputs, but the digital PWMs provide a pseudo-analogue capability (we introduced this concept previously in PE, March 2023). We access the PWMs using calls to the Arduino’s built-in analogWrite() function. This function accepts two arguments – the pin we wish to control and a value between 0 and 255, which controls the mark:space (on:off) ratio on the output. The easiest way to wrap one’s brain around this is to look at some code and see it in action. With respect to the code, we can modify our loop() function as illustrated in Listing 7 (file CB-Nov23-09.txt). The clever part here occurs on Line 27. We know that the value we read from our trimpot and store in our valPot variable will be in the range 0 to 1023. We also know that the analogWrite() function requires a value in the range 0 to 255. In a crunchy nutshell, we can obtain the value we wish to feed into the analogWrite() function by dividing the value read from the trimpot by 4, and this is just what we do on Line 27 using the shift right operator >>. We introduced this operator in an earlier column (PE, April 2023). In that column, we explained how shifting a binary value one bit to the right is equivalent to a divide by 2, which Listing 6. Varying speed of flashing segment. Practical Electronics | November | 2023 Components from Part 1 LEDs (assorted colours) https://amzn.to/3E7VAQE Resistors (assorted values) https://amzn.to/3O4RvBt Solderless breadboard https://amzn.to/3O2L3e8 Multicore jumper wires (male-male) https://amzn.to/3O4hnxk Components from Part 2 7-segment display(s) https://amzn.to/3Afm8yu Components from Part 5 Momentary pushbutton switches https://amzn.to/3Tk7Q87 Components from Part 6 Passive piezoelectric buzzer https://amzn.to/3KmxjcX Components for Part 9 SW-18010P vibration switch Components for Part 10 Listing 7. Varying brightness/intensity. Breadboard mounting trimpots means shifting a binary value two bits to the right is equivalent to a divide by 4. Load this new program into your Arduino and observe how turning your trimpot now varies the brightness of segment D on the 7-segment display. No homework, but… I’m not going to set any homework this month, not least that we still have two items remaining from last month. However, I would like you to start thinking about how we might vary the https://bit.ly/46SfDA4 https://bit.ly/3QAuz04 brightness of multiple segments on the display. Remember that we use different segment combinations to represent the digits 0 through 9. The number 8 requires us to light all seven of our segments, but we have only six PWMs. What are we going to do? All will be revealed in our next column. Until then, have a good one! Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor of all he surveys at CliveMaxfield.com – the go-to site for the latest and greatest in technological geekdom. Comments or questions? Email Max at: max<at>CliveMaxfield.com Teach-In 8 CD-ROM Exploring the Arduino EE FR -ROM CD ELECTRONICS TEACH-IN 8 FREE CD-ROM SOFTWARE FOR THE TEACH-IN 8 SERIES FROM THE PUBLISHERS OF This CD-ROM version of the exciting and popular Teach-In 8 series has been designed for electronics enthusiasts who want to get to grips with the inexpensive, immensely popular Arduino microcontroller, as well as coding enthusiasts who want to explore hardware and interfacing. Teach-In 8 provides a one-stop source of ideas and practical information. The Arduino offers a remarkably effective platform for developing a huge variety of projects; from operating a set of Christmas tree lights to remotely controlling a robotic vehicle wirelessly or via the Internet. Teach-In 8 is based around a series of practical projects with plenty of information for customisation. The projects can be combined together in many different ways in order to build more complex systems that can be used to solve a wide variety of home automation and environmental monitoring problems. The series includes topics such as RF technology, wireless networking and remote web access. PLUS: PICs and the PICkit 3 – A beginners guide The CD-ROM also includes a bonus – an extra 12-part series based around the popular PIC microcontroller, explaining how to build PIC-based systems. £8.99 INTRODUCING THE ARDUINO • Hardware – learn about components and circuits • Programming – powerful integrated development system • Microcontrollers – understand control operations • Communications – connect to PCs and other Arduinos PLUS... PIC n’MIX PICs and the PICkit 3 - A beginners guide. The why and how to build PIC-based projects Teach In 8 Cover.indd 1 04/04/2017 12:24 PRICE £8.99 Includes P&P to UK if ordered direct from us SOFTWARE The CD-ROM contains the software for both the Teach-In 8 and PICkit 3 series. ORDER YOUR COPY TODAY! JUST CALL 01202 880299 OR VISIT www.epemag.com Practical Electronics | November | 2023 49