Modifications

Sauter à la navigation Sauter à la recherche
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{RASP-SENSE-HAT-ASTRO-PI-NAV}}
 
{{RASP-SENSE-HAT-ASTRO-PI-NAV}}
 +
 +
== Premier programme ==
 +
Connect the Raspberry Pi peripherals (keyboard, mouse, monitor, and power), and log in using the following login information:
 +
 +
<nowiki>login: pi
 +
password: raspberry</nowiki>
 +
 +
You will not see any text when typing the password; this is a security feature.
 +
 +
Load the graphical user interface by typing {{fname|startx}}. Now, open Python 3 using {{fname|Menu > Programming > Python 3}}. This will cause a Python Shell window to appear. Select {{fname|File > New Window}}, and type in the following code:
 +
 +
<nowiki>from astro_pi import AstroPi
 +
ap = AstroPi()
 +
ap.show_message("Hello my name is Tim Peake")</nowiki>
 +
 +
Select {{fname|File > Save}} and choose a file name for your program, then select {{fname|Run > Run module}}. Your message should then scroll across the LED matrix in white text.
 +
 +
Why not try changing the message between the double quotation marks and running your code again?
    
{{RASP-SENSE-HAT-ASTRO-PI-TRAILER}}
 
{{RASP-SENSE-HAT-ASTRO-PI-TRAILER}}
29 922

modifications

Menu de navigation