Gjør som tusenvis av andre bokelskere
Abonner på vårt nyhetsbrev og få rabatter og inspirasjon til din neste leseopplevelse.
Ved å abonnere godtar du vår personvernerklæring.Du kan når som helst melde deg av våre nyhetsbrev.
The Raspberry Pi makes an ideal match for the Internet of Things. But to put it to good use in IoT you need two areas of expertise, electronics and programming and because of the way hardware and software engineering tend to occupy separate niches, you may need help with combining the two which is what this book sets out to do.Python is an excellent language for learning about physical computing. It might not be as fast as C, but it is much easier to use for complex data processing. One reason for Python's popularity is its wealth of supporting libraries and there are several for interfacing hardware. The GPIO Zero library is the official way to use Python with the GPIO and other devices and this book looks at how to use it to interface to fundamental IoT devices - from LEDs and buzzers to servos and stepper motors and several off-the-shelf Raspberry Pi add-ons.This revised second edition had been expanded to cover all the current Raspberry Pis including the latest, the Pi 5, and the Pi Zero 2W which, with its WiFi capability and being a quad-core device, is an ideal device for IoT projects. It has also been updated to cover the latest version of the GPIO Zero library, which is both the library recommended by Raspberry Pi and the only one that works with the Pi 5.The emphasis in this book is about using and understanding the hardware and GPIO Zero. It not only shows you how to "follow the beaten track", but how to create your own tracks. While it isn't a project book, many of the code examples described are part way to projects and all of the devices and techniques described can be used to create practical projects. Similarly while it doesn't teach you the whole of Python, it does bring you up to speed in the aspects of the language needed for interfacing with hardware.Harry Fairhead has worked with microprocessors, and electronics in general, for many years and is an enthusiastic proponent of the IoT. He is the author of Raspberry Pi IoT in C, which has recently been republished in its third edition, and Raspberry Pi IoT in C Using Linux Drivers, now in its second edition.Mike James is the co-author Raspberry Pi IoT in Python Using Linux Drivers, Second Edition. He is also the author of the Programmer's Python: Something Completely Different series of books.
The Raspberry Pi makes an ideal match for the Internet of Things. To put it to good use in IoT you need two areas of expertise, electronics and programming, and this presents a barrier to getting started. However, there is an overlooked route that can provide a shortcut. Pi OS, the Raspberry Pi's operating system, is Linux- based and Linux drivers are available for many off-the-shelf IoT devices. Using Linux drivers saves the effort of implementing low-level code and has the advantage of working the same on all versions of the Pi, including the recently launched Pi 5 which isn't hardware compatible with earlier versions. This Second Edition has been updated to cover the Pi 5 and also the Pi Zero 2W, which is an ideal candidate for use in IoT projects. It has also been updated to use the latest versions of Pi OS, Bullseye and Bookworm. Throughout this book you will find a practical approach to understanding electronic circuits and datasheets and translating this to code, specifically using Python and VS Code. The first IoT program anyone writes is "Blinky" to flash an LED and this book is no exception, but it might not be quite what you expect. Instead of using a GPIO line driver, it uses the Linux LED driver. The GPIO isn't left out, however, as the next three chapters focus on its use via the GPIO character driver, which replaces the old, but very common, sysfs GPIO driver. This is the way to do modern GPIO. A key component in any look at Linux and its relationship to hardware is the relatively new Device Tree. While most accounts of this resource are aimed at device driver writers, this one is aimed at device driver users and to this end we look at several devices, including the DHT22 temperature and humidity sensor. After a brief detour into some basic electronics, we see how Pulse Width Modulation is supported via a driver. From here we tackle the two standard buses, I2C and SPI, first going through the basics and then looking at the two attempts to impose a higher organization, the hardware monitoring system, hwmon, and Industrial I/O, IIO. The 1-Wire bus is also covered in detail. The final chapter takes things to the next level and considers creating your own custom overlays by writing fragments to the device tree. Harry Fairhead's other books include Applying C For The IoT With Linux; Programming the Raspberry Pi Pico/W, 2nd Ed, Raspberry Pi IoT in C, 3rd Ed, Raspberry Pi IoT in C Using Linux Drivers, 2nd Ed, Programming the Raspberry Pi Pico/W, 2nd Ed and Programming the ESP32 in MicroPython. Mike James is the author of the Programmer's Python: Something Completely Different series of books and several other programming and computer science titles in the I Programmer Library.
Writing a C extension for Python is good for fun and profit! The fun part is that adding Python to C gives you so much more power and a deeper understanding of how Python works. The internals of Python are worth knowing about because they suggest new approaches to other problems. As well as being interesting, it is also a valuable skill. Extending & Embedding Python Using C tells you everything you need to know about the C API, which is what you use to create an extension. It is essentially the Python runtime and so exploring it tells you a lot about Python. You don't need to be an expert Python programmer to create an extension, but it helps. As you are going to be writing mostly C code, programming in C is a more important skill for this task. While you don't have to be a C expert, you do need to be reasonably competent and C aficionados will enjoy finding out about some of the clever techniques in use in the C API. Extending Python is a way of bringing any C-based application or library to a much wider audience. Converting Python functions into C functions is also a way of speeding things up. Moreover, you can provide access to hardware or system features that are usually inaccessible by creating an extension. The final chapter explains how to convert the skills you have gained in creating a Python extension to embed Python in a C program. This is a less common requirement, but it has some interesting advantages and possibilities and once you know how to create a Python extension it is easy. Mike James has a BSc in Physics, an MSc in Mathematics, a PhD in Computer Science and in a long career as a programmer he has mastered many programming languages. He is the founder and chief editor of I-Programmer, the online magazine written by programmers for programmers and the author of dozens of books. His previous three books on Python, Programmer's Python: Everything Is An Object, Programmer's Python: Everything Is Data and Programmer's Python: Async form a set of "Something Completely Different" books that look at what makes Python special and sets it apart from other programming languages. While not part of the series, this book shares the same overall philosophy.
Much has been written about aviation, nearly all of it focussed on the glamorous work of pilots. Even cabin crew have checked in their stories. However, though a hundred of us stand behind every pilot, virtually nothing has been written about groundlings, without whom there would be no flying. Mayfly is one man's account of his two-and-a-half-decade adventure in aviation; the fun, the excitement, the tragedy, as witnessed (mostly) from the ground.
The ESP32 is a remarkable device. It is low cost but with many different subsystems that make it more powerful than you might think. You can use it for simple applications because it is cheap, but you can also use it for more sophisticated applications because it is capable. MicroPython is a good choice of language to program the ESP32. Although it is a slower language than C, most of the time this doesn't matter and it is much easier to use. As a high-level language, MicroPython is based on Python 3 and is fully object-oriented. In general, you can take an existing Python 3 program and simply run it under MicroPython. If there are any changes to make, they are generally minor.Another good thing about MicroPython on the ESP32 is that it is very easy to get started. After a simple installation procedure you have a working MicroPython machine which you can program almost at once using the Thonny IDE or PyCharm which has more extensive syntax checking and input prompting.The purpose of the book is to reveal what you can do with the ESP's GPIO lines together with widely used sensors, servos and motors and ADCs. After covering the GPIO, outputs and inputs, events and interrupts, it gives you hands-on experience of PWM (Pulse Width Modulation), the SPI bus, the I2C bus and the 1-Wire bus. We also cover direct access to the hardware, adding an SD Card reader, sleep states to save power, the RTC, RMT and touch sensors, not to mention how to use WiFi.>Jointly authored by Harry Fairhead and Mike James, this book combines Harry's expertise in electronics and the IoT with Mike's knowledge of Python. Their previous books include Programming the Raspberry Pi Pico/W in MicroPython, Raspberry Pi IoT In Python, Raspberry Pi IoT In Python Using Linux Drivers while Harry Fairhead is the author of the C language counterparts. His other books include Fundamental C: Getting Closer To The Machine, Applying C For The IoT With Linux, and Micro: bit IoT in C. Mike James is the author of the Programmer's Python: Something Completely Different series of books and several other programming and computer science titles in the I Programmer Library.
Adding WiFi to the Raspberry Pi Pico turns this low-cost, small form factor device into a true IoT device. The extra capabilities added to the Pico W open up loads of opportunities, but only if you are prepared to do battle with the two libraries that provide networking and security - lwIP and mbedtls respectively. The problem with these large libraries of code is that they are poorly documented and don't refer directly to the Pico W and its SDK. This book sets out to remedy this by providing a guide to these libraries along with examples of what you can do with them. Having introduced the Pico WiFi Stack and basic network connections, we look at how to use TCP to create the all-important Protocol Control Block and then tackle implementing an HTTP client. As well as covering the basic mechanics of using lwIP, we also concentrate on how to organize the use of an asynchronous library based on callbacks. The problem of IoT security is unique because IoT devices can be physically accessed by an attacker and hence any secrets embedded in their code have to be considered almost as public knowledge. Even so it is worth implementing encryption and this is achieved using mbedtls to create an HTTPS client. If you can ensure the physical security of the IoT device, then running it as a server is possible and this is covered in both HTTP and HTTPS modes, complete with certificates. We cover the basics of cryptography, including the problem of generating random numbers, what an encryption suite is and the various modes of AES encryption.>Harry Fairhead is also the author of Programming The Raspberry Pi Pico/W In C; Raspberry Pi IoT in C, Raspberry Pi IoT In C Using Linux Drivers, Applying C For The IoT With Linux, Fundamental C: Getting Closer To The Machine and Micro: bit IoT in C. Mike James is the author of Programming the Raspberry Pi Pico/W in MicroPython; Raspberry Pi IoT In Python Using GPIO Zero; and the Programmer's Python: Something Completely Different series of books and several other programming and computer science titles in the I Programmer Library.
"Mike James is a poet in love with bridges, a poet of praisein search of connective tissue, relentlessly on the move,searching for signifiers, trying to find that loose thread ofinspiration. "The sky is something we can drink from," hewrites. "Darkness is never clean or clear," knowing a humanbeing in love with mystery is never finished, and that theworld is mostly hidden from us, and poetry is one of theways humans discover the most important aspects of them-selves, illuminating and untangling as it tells. These lovelypoems are a blessing, an unexpected warm wind blowsthrough them and amazing declarations shiver forth asJames travels and watches and listens. "Sound brings us toour senses," said Thoreau, and the poems here are quietand tight, acutely aware of their own dissolution, and thetemporary spaces that we occupy. "The moon looks nothinglike the one I touched," writes James, and with a deftsurrealistic brush he fills in all the colors he finds and theones he had hoped to find. There are wonders to discoverin every poem and I gobbled them up. Sit with this bookand listen and the singing will settle in your imagination.Don't just take my word for it, open the cover and startswimming and you will be immersed in a better world." -Keith Flynn, editor of The Asheville Poetry Review and author of The Skin of Meaning"Mike James writes with a toymaker's sense of wonder. His poems, like toys, delight and fascinate, leading the reader's imagination in strange and beautiful directions. 'I never put a feather back on a bird,' he says in 'It's Lovely, at Last,' and we, looking on, know exactly what he means and how that irrational failure feels. James's poems attack the mind with a surrealistic bent like the verses of James Tate. They spiral and swirl, then lift and float. 'Most of my friends live with hallucinations,' he says in 'Discount Ghazal of Everyday Saints.' To read these poems is to be one of James's friends, dancing with phantasms. His writing is something to be experienced as much as read: a journey well worth taking." -Ace Boggess, author of I Have Lost the Art of Dreaming It So and The Prisoners¿"Like C.K. Williams, Mike James is a master of the flexible long line and its component parts. Compact in form, expansive in vision, his poems render ordinary events in startling focus, and find surreal gestures where most of us wouldn't expect them. I envy the precision and energy of poems like "Thinning Stars, Along the River," and the humor of those like "Where I'm From." This is a vivid and lively book, amusing and sobering at once."--William Doreski, author of Riding the Comet
Imagination, adventure, and a big ol' dose of nonsense!Noah and his trusty sidekick, Rufus, are off on another adventure. Join them on Spaghetti Mountain as they battle a stinky clove of garlic, survive the treacherous Swamp Bolognes...
Intended for electronics undergraduates, this work covers analogue, digital electronics and microelectronics - at a level suitable for most first and second year modules. It covers the mandatory units (units 1-7) of the new Higher National scheme.
Abonner på vårt nyhetsbrev og få rabatter og inspirasjon til din neste leseopplevelse.
Ved å abonnere godtar du vår personvernerklæring.