⧜  Édition, etc.  ⧜

À proposRéférencesContact

 TRADUCTION
Translation
⁜  Programmation : utiliser Scratch (extrait)

On peut utiliser un vaste panel de langages de programmation avec le Raspberry Pi, mais ici nous utiliserons Scratch. C'est un excellent langage pour débutant, parce qu'il introduit une majorité des concepts de programmation tout en restant facile d'utilisation. Il est particulièrement adapté à la création de programmes graphiques comme des jeux. Si vous n'avez jamais programmé auparavant, ou si vous êtes un vrai débutant en programmation graphique, nous vous mettrons à l'aise en douceur et, avec un peu de chance, vous trouverez cela amusant. Sans autres manières, débutons.
Vous trouverez Scratch sur le bureau de Raspbian, et n'aurez donc pas besoin d'installer quoi que ce soit : cliquez simplement sur l'icône pour commencer. Pour cet exercice, mieux vaut utiliser Raspbian plutôt qu'une autre distro pour le Pi, car elles sont peu nombreuses à supporter Scratch. Si vous souhaitez essayer sur d'autres ordinateurs (non Raspberry Pi), Scratch est disponible sur la plupart des systèmes, dont Windows, Mac OS X et la plupart des déclinaisons Linux. Rendez-vous sur http://scratch.mit.edu pour des informations complémentaires si vous souhaitez installer Scracth sur d'autres ordinateurs.
La fenêtre principale se divise en deux sections. Dans les grandes lignes, les morceaux qu'on peut utiliser pour créer vos programmes sont sur la gauche, on monte ses programmes au milieu, et les programmes se lancent sur la droite. Chaque programme est constitué d'un certain nombre de sprites (images) qui contiennent des scripts. Ce sont ces scripts qui contrôlent ce qui survient lorsque le programme se lance.

Programming: using Scratch (excerpt)

You can use a wide range of programming languages with the Raspberry Pi, but here we’re going to use Scratch. It’s a great beginner’s language, because it introduces many of the concepts of programming while at the same time being easy to use. It’s especially good for creating graphical programs such as games. If you’ve never programmed before, or if you’re completely new to graphical programming, we’ll ease you gently in, and hopefully have a little fun along the way. Without further ado, let’s get started.
You’ll find Scratch on the desktop in Raspbian, so there’s no need to install anything – just click on the icon to get started. It’s best to use Raspbian rather than one of the other distros for the Pi for this, since not many of the others support Scratch. If you want to try this on other (non-Raspberry Pi) computers, Scratch is available for most systems, including Windows, Mac OS X and most flavours of Linux. Head to http://scratch.mit.edu for more information if you want to install Scratch on another computer.
The main window is split up into sections. Broadly speaking, the bits you can use to make your programs are on the left, you make your programs in the middle, and the programs run on the right. Each program is made up of a number of sprites (pictures) that contain a number of scripts. It’s these scripts that control what happens when the program is running.

in Raspberry Pi - The Complete Manual

Raspberry Pi - Le Guide ultime
Retour