Programming Arduino by Simon Monk
Author:Simon Monk
Language: eng
Format: epub
Publisher: McGraw Hill LLC
Published: 2023-12-15T00:00:00+00:00
The flashSequence Function
We have assumed a function called flashSequence and made use of it, but now you need to write it. We have planned for it to take a string containing a series of dashes and dots and to make the necessary flashes with the correct timings.
Thinking about the algorithm for doing this, you can break it into the following steps:
For each element of the string of dashes and dots (such as .-.-):
Flash that dot or dash.
Using the concept of programming by intention, letâs keep the function as simple as that.
The Morse codes are not the same length for all letters, so you need to loop around the string until you encounter the end marker, . You also need a counter variable called i that starts at 0 and is incremented as the processing looks at each dot and dash:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Linux Device Driver Development Cookbook by Rodolfo Giometti(3952)
Embedded Programming with Modern C++ Cookbook by Igor Viarheichyk(3726)
Implementing Cellular IoT Solutions for Digital Transformation by Dennis McCain(3649)
Embedded Linux Development Using Yocto Project - Third Edition by Otavio Salvador & Daiane Angolini(3488)
TinyML Cookbook by Gian Marco Iodice(3412)
Simplifying 3D Printing with OpenSCAD by Colin Dow(2852)
TinyML Cookbook by Gian Marco Iodice & Ronan Naughton(2618)
Fusion 360 for Makers by Lydia Sloan Cline(2228)
Networking A Beginner's Guide by Bruce Hallberg(2225)
Hands-On Linux for Architects by Denis Salamanca(2065)
But How Do It Know? by J. Clark Scott(2039)
Computers For Seniors For Dummies by Nancy C. Muir(2020)
Raspberry Pi and MQTT Essentials by Dhairya Parikh(1975)
Arduino Project Handbook, Volume 2: 25 Simple Electronics Projects for Beginners by Geddes Mark(1958)
9781803246888-ENHANCING DEEP LEARNING WITH BAYESIAN INFERENCE by Unknown(1914)
Hack and HHVM by Owen Yamauchi(1895)
31 Days Before Your CompTIA A+ Exams (Shanette Luellen's Library) by Benjamin Patrick Conry(1873)
MicroPython Projects by Jacob Beningo(1756)
Hands-On Internet of Things with MQTT by Tim Pulver(1726)
