Название: Learning C on the Raspberry Pi Pico through simple games Автор: Toshinori Fujii Издательство: Go-Ahead LLC Год: 2024 Страниц: 161 Язык: английский Формат: epub Размер: 25.1 MB
When it comes to microcontrollers, Arduino UNO, Raspberry Pi and MicroBit are used. The MicroBit is probably the least demanding of these, as the software to be written to the MicroBit microcontroller can be written in three main ways, or in blocks as in Scratch. Another commonly used microcontroller is the Arduino UNO from the Arduino series. This microcontroller is similarly available with the Arduino IDE C software, which can be downloaded free of charge. As these microcontrollers are widely used by many people, a lot of information is available on the web, and this information makes them much easier to use.
?Now, the Raspberry Pi is a bit harder than these two microcontrollers. This is because the Raspberry Pi Pico-specific C software is not immediately available. Therefore, we will use the C language of the Arduino IDE to set up a relatively simple runtime environment.
?Unlike the Raspberry Pi, the Raspberry Pi Pico described in this manual is not a PC, but is treated like an Arduino or MicroBit microcontroller: you write the programme on your PC and write the programme from your PC to the microcontroller. Writing can be done via USB, so it is easy to operate. The Raspberry Pi Pico W is also Wifi enabled. This allows you to study the IoT. It is also relatively cheap compared to other Raspberry Pi's, around $1000, and if it breaks, it will be less of a shock.
?This book explains the Raspberry Pi Pico and the C language by creating a game in C for those who are new to the Raspberry Pi Pico. Use this book as a starting point to learn more about Raspberry Pi Pico and the C language.
Contents:
1.Introduction
2.Raspberry Pi ?2.1 Raspberry Pi?Pico?W ?2.2 Installing the C language ?(1) Installing the Arduino IDE ?(2) Checking programme operation
3.Raspberry Pi ?3.1 Displaying "Hello World" ?3.2 Displaying the four arithmetic operations ?3.3 Entering and displaying characters ?3.4 Calculating and displaying variables ?3.5 Increment operators ?3.6 Bitwise operators ?3.7 Binary, octal and hexadecimal numbers ?3.8 Computing real numbers ?3.9 Adding a comment ?3.10 Branching and repetition 3.11 Iteration ?3.12 Arrays ?3.13 Character strings ?3.14 Function
4.Elements for the experiment (1) LED (2) Resistance (1/4W) (3) Breadboard (4) Jumper wire (5) Piezoelectric speaker ?4.2 Experiments with lighting LED ?4.3 Switch experiment ?4.4 Piezoelectric speaker experiments ?4.5 Experiments with I2C communication
5.Easy game creation with Raspberry Pi Pico ?5.1 Number guessing game ?5.2 Calculator Invader game ?5.3 tic-tac-toe ?5.4?magic square ?5.5 Block puzzle game ?5.6 The Tower of Hanoi game ?5.7 Block-breaking games
References
Скачать Learning C on the Raspberry Pi Pico through simple games
|