Atjaunināt sīkdatņu piekrišanu

Hello Raspberry Pi! [Mīkstie vāki]

4.00/5 (20 ratings by Goodreads)
  • Formāts: Paperback / softback, 311 pages, height x width x depth: 189x233x18 mm, weight: 552 g
  • Izdošanas datums: 14-Jan-2016
  • Izdevniecība: Manning Publications
  • ISBN-10: 1617292451
  • ISBN-13: 9781617292453
  • Mīkstie vāki
  • Cena: 30,43 €*
  • * Šī grāmata vairs netiek publicēta. Jums tiks paziņota lietotas grāmatas cena
  • Šī grāmata vairs netiek publicēta. Jums tiks paziņota lietotas grāmatas cena.
  • Daudzums:
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Formāts: Paperback / softback, 311 pages, height x width x depth: 189x233x18 mm, weight: 552 g
  • Izdošanas datums: 14-Jan-2016
  • Izdevniecība: Manning Publications
  • ISBN-10: 1617292451
  • ISBN-13: 9781617292453
A fun and imaginative way for kids and other beginners to take their first steps programming on a Raspberry Pi.

 

The Raspberry Pi is a small, low-cost computer invented to encourage experimentation. The Pi is a snap to set up, and using the free Python programming language, you can learn to create video games, control robots, and maybe even write programs to do your math homework!

 

Hello Raspberry Pi! is a fun way for kids to take their first steps programming on a Raspberry Pi. First, you discover how to set up and navigate the Pi. Next, begin Python programming by learning basic concepts with engaging challenges and games. This book gives you an introduction to computer programming as you gain the confidence to explore, learn, and create on your own. The last part of the book introduces you to the world of computer control of physical objects, where you create interactive projects with lights, buttons, and sounds.

 

What's Inside



 

Learn Python with fun examples Write games and control electronics Use Pygame for video game sounds and graphics Loaded with programming exercises 



About the Reader

To use this book, you'll need a Raspberry Pi starter kit, keyboard, mouse, and monitor. No programming experience needed.
Preface xiii
Acknowledgments xv
About this book xvii
Part 1 Getting started
1(64)
1 Meet Raspberry Pi
3(30)
What is the Raspberry Pi?
4(1)
Exploring your Raspberry Pi's parts: hardware
4(15)
Giving your Pi a cozy home: Pi cases
6(1)
The brain of your Pi: system on a chip
7(1)
Connecting a keyboard and mouse: USB ports
8(2)
Storing memories: your Pi gets a memory card
10(3)
Connecting a TV or monitor: HDMI port
13(4)
Other ports and connections
17(1)
Powering your Pi: microUSB power port
17(1)
It's alive! Plugging in the Pi
18(1)
Getting your Pi running: software
19(7)
Installing the Raspbian operating system
19(2)
Configuring the operating system: making it yours
21(3)
Saving your configuration and rebooting
24(2)
Getting around: learning Raspbian
26(3)
Finding and opening applications on your Raspberry Pi
26(1)
Your files and folders
26(2)
Writing code
28(1)
Fruit Picker Extra: shopping at the Pi Store
29(1)
Challenge
30(1)
Scavenger hunt
31(1)
Summary
31(2)
2 Exploring Python
33(32)
Playing with Python
33(2)
Discovering Python's mathematical operators
35(6)
Adding and subtracting
35(2)
Multiplying and dividing
37(1)
Figuring out whole numbers and remainders
38(1)
Exponents
38(1)
Square roots
39(1)
Challenge: stacking Pis!
39(2)
Storing information using variables
41(9)
Creating variables and assigning values
42(1)
Displaying variable values
42(3)
Storing strings in variables
45(1)
Changing the value of variables
46(4)
Displaying text on a screen
50(1)
Using the print function
50(1)
Troubleshooting
51(1)
Creating programs
52(5)
Writing Python programs with IDLE
53(1)
Starting a new program
54(2)
Saving programs
56(1)
Python interpreting the program
57(1)
Fruit Picker Extra: creating documents
57(3)
Writing silly things and saving them
57(3)
Challenges
60(2)
The matrix
61(1)
Building a brick wall
61(1)
Pi electrons
62(1)
Summary
62(3)
Part 2 Playing with Python
65(84)
3 Silly Sentence Generator 3000: creating interactive programs
67(24)
Creating a welcome message
68(5)
Starting a new program
69(2)
Saving the program
71(2)
Adding notes in your code
73(2)
Using hashtags for comments
73(2)
Getting and storing information
75(2)
Joining strings
77(6)
Using more than one input
79(1)
Building the sentence
80(1)
Troubleshooting
81(2)
Completing the program: displaying the silly sentence
83(2)
Fruit Picker Extra: Minecraft Pi
85(3)
What's Minecraft?
85(1)
Launching Minecraft Pi
86(2)
Python programming interface to Minecraft Pi
88(1)
Challenges
88(2)
Knight's Tale Creator 3000
88(1)
Subliminal messages
89(1)
Summary
90(1)
4 Norwegian Blue parrot game: adding logic to programs
91(30)
Displaying the game introduction
92(9)
Creating the game welcome message and instructions
94(7)
Collecting input from the player
101(4)
Using if statements to respond to users in different ways
105(5)
Practicing if statements
108(2)
Using while loops to repeat things
110(5)
A closer look at while loops
112(1)
Breaking out of a while loop
113(1)
Practicing while loops
114(1)
Using Python code libraries to generate random numbers
115(3)
Fruit Picker Extra: Scratch
118(1)
Challenges
119(1)
Summary
120(1)
5 Raspi's Cave Adventure
121(28)
Project introduction: Raspi's Cave Adventure
122(2)
Left cave
124(1)
Right cave
124(1)
Hey wait, you need a plan (flow diagrams)
124(2)
Which way should Raspi go? (checking input)
126(7)
Handling unexpected input
127(4)
Turning flow diagrams into code
131(2)
Simplify! Making your own functions
133(9)
Finishing the left cave
138(1)
Exploring the right cave
139(2)
Troubleshooting
141(1)
Fruit Picker Extra: playing video
142(3)
Live streaming: exploring from your Pi
143(2)
Challenges
145(2)
Introducing dramatic pauses
145(1)
Random demise
146(1)
Play again?
147(1)
Scream!
147(1)
Summary
147(2)
Part 3 Pi and Python projects
149(90)
6 Blinky Pi
151(25)
Setting up your Pi for physical computing
153(8)
GPIO pins
153(2)
Breaking out the GPIO pins to a breadboard
155(3)
Breadboard basics
158(3)
Building the LED circuit
161(5)
Step 1 Connect the jumper from GPIO pin 21
163(1)
Step 2 Add the red LED
164(1)
Step 3 Connect a resistor
164(2)
Software: blinkLED program
166(5)
Running the program
168(1)
blinkLED: how it works
169(2)
Adding more LEDs
171(2)
Building the circuit
171(2)
Multiple LEDs: program it!
173(1)
Challenges
174(1)
Wave pattern
174(1)
Simon Says
174(1)
Random blinking
174(1)
Summary
175(1)
7 Light Up Guessing Game
176(28)
Guessing Game design
178(1)
Hardware: building the circuit
179(9)
Numbers, numbers, numbers!
179(1)
Wiring an RGB LED
180(1)
Circuit sketch
180(8)
Software: LEDGuessingGame program
188(13)
Setting up the GPIO pins for the RGB LED
190(5)
Main game loop and logic
195(2)
Guessing Game Loop and logic
197(1)
Adding the Play Again Loop and logic
198(2)
Playing the game
200(1)
Troubleshooting
200(1)
Challenges
201(1)
Game winner
201(1)
Easter egg
201(1)
Warmer and colder
201(1)
Darth Vader surprise
202(1)
Summary
202(2)
8 DJ Raspi
204(35)
Project overview
205(2)
Setting up your Pi to play sounds
207(3)
OMXPlayer and MP3s
208(1)
Troubleshooting
209(1)
Hardware: building the circuit
210(8)
Wiring a button
210(1)
Circuit sketch
211(6)
Adding the second button
217(1)
Software: the DJ Raspi program
218(17)
Setting up the Pi: initializing the buttons
220(1)
Getting a list of sounds
221(4)
Getting a value of an item stored in a list
225(1)
Getting the length of a list
226(1)
Building a list of sound files with the os library
227(1)
Playing a sound when a button is pressed
228(3)
Functions!
231(3)
Testing: your first gig as DJ Raspi
234(1)
Troubleshooting
235(1)
Challenges
236(1)
Double button press surprise
236(1)
Yoda Magic 8 Ball
236(1)
Continuing to explore
237(1)
Summary
237(2)
Appendix A Raspberry Pi troubleshooting 239(6)
Appendix B Raspberry Pi ports and legacy boards 245(16)
Appendix C Solutions to chapter challenges 261(18)
Appendix D Raspberry Pi projects 279(6)
Index 285
Ryan Heitz is a teacher, programmer, maker, father, and big kid. He is the co-founder of Ideaventions, an educational organization that is changing STEM education. He specializes in creating classes and teaching kids how to experience code in a fun and engaging way. As a programmer, Ryan has developed software for everything from NASA data collection systems to web mapping applications.