Vous êtes sur la page 1sur 22

The Raspberry Pi 2 Model B is the second generation Raspberry Pi.

it has:
✓ A 900MHz quad-core ARM Cortex-A7 CPU
✓ 1GB RAM
✓ 4 USB ports
✓ 40 GPIO pins
✓ Full HDMI port
✓ Ethernet port
✓ 3.5mm audio jack and composite video
✓ Camera interface (CSI)
✓ Display interface (DSI)
✓ Micro SD card slot
✓ VideoCore IV 3D graphics core

it can run the full range of ARM GNU/Linux distributions,


The Raspberry Pi 3 Model B is the second generation Raspberry Pi.

it has:
✓ Quad Core 1.2GHz Broadcom BCM2837 64bit CPU
✓ 4 Pole stereo output and composite video port
✓ 1GB RAM
✓ 100 Base Ethernet
✓ 40-pin extended GPIO
✓ 4 USB 2 ports
✓ Full size HDMI
✓ CSI camera port for connecting
a Raspberry Pi camera
✓ Upgraded switched Micro USB power
source up to 2.5A
✓ BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board
✓ DSI display port for connecting a Raspberry Pi touchscreen display
✓ Micro SD port for loading your operating system and storing data
it can run the full range of ARM GNU/Linux distributions,
✓ Camera interface (CSI)
✓ Display interface (DSI)
WPI
BCM
UART Universal Asynchronous Receiver/Transmitter

SPI (pour Serial Peripheral Interface) est un bus de données


série synchrone

I2C (signifie : Inter-Integrated Circuit, en anglais) est un bus


informatique sériel
Les spécifications électriques de base pour une alimentation appropriée pour un Raspberry Pi
✓ est qu’elle fournit une tension de 5V DC (courant continu)
✓ et peut fournir un courant jusqu'à 700mA.
✓ Il doit également avoir une prise micro USB à l'extrémité de la tête.

Si vous allez utiliser


✓ un dongle WiFi,
✓ ou d'autres périphériques USB qui consomme plus d'énergie,
✓ connexion vidéo HDMI
✓ alors il faudrait une alimentation capable de livrer 1.5 A ou même 2 A.
Carte SD : Class 4
✓ 4 GB : pour les systèmes d’exploitations légers
✓ 8 GB : pour les systèmes d’exploitations complets
Système d’exploitation

Programme
d’installation

Outil de Formatage
Le Raspberry est configuré au départ en dhcp
Outil pour connaitre l’adresse IP

Outil SSH pour atteindre le Raspberry


Login : pi
Pass : raspberry
sudo raspi-config

Pour configurer le point d’accés et le ssh pour putty


Mettre à jour le système d’exploitation

obligatoire
Prend beaucoup de temps pas obligatoire

Installation Apache (Serveur WEB)


sudo apt install apache2

sudo chown -R pi:www-data /var/www/html/


Donner les droits pour les dossiers d’hébergement sudo chmod -R 770 /var/www/html/

sudo apt install php php-mbstring

Installer MySQL
Remove
Reinstall
Outil WEB de gestion de base de données
L’option –g permet de passer en mode BCM
#include <stdio.h> // Used for printf() statements
#include <wiringPi.h> // Include WiringPi library!

// Pin number declarations. We're using the Broadcom chip pin numbers.

const int pwmPin = 18; // PWM LED - Broadcom pin 18, P1 pin 12
const int ledPin = 23; // Regular LED - Broadcom pin 23, P1 pin 16
const int butPin = 17; // Active-low button - Broadcom pin 17, P1 pin 11

const int pwmValue = 512; // Use this to set an LED brightness

int main(void)
{
// Setup stuff:
wiringPiSetupGpio(); // Initialize wiringPi -- using Broadcom pin numbers

pinMode(pwmPin, PWM_OUTPUT); // Set PWM LED as PWM output


pinMode(ledPin, OUTPUT); // Set regular LED as output
pinMode(butPin, INPUT); // Set button as INPUT
pullUpDnControl(butPin, PUD_UP); // Enable pull-up resistor on button

printf("Blinker is running! Press CTRL+C to quit.\n");


// Loop (while(1)):
while(1)
{
if (digitalRead(butPin)) // Button is released if this returns 1
{
pwmWrite(pwmPin, pwmValue); // PWM LED at bright setting
digitalWrite(ledPin, LOW); // Regular LED off
}
else // If digitalRead returns 0, button is pressed
{
pwmWrite(pwmPin, 1024 - pwmValue); // PWM LED at dim setting

// Do some blinking on the ledPin:


digitalWrite(ledPin, HIGH); // Turn LED ON
delay(500); // Wait 75ms
digitalWrite(ledPin, LOW); // Turn LED OFF
delay(500); // Wait 75ms again
}
}

return 0;
}
#include <stdio.h>
#include <wiringPi.h>

// LED Pin - wiringPi pin 1 is BCM_GPIO 18.

#define LED 0

int main (void)


{
printf ("Raspberry Pi blink\n") ;

wiringPiSetup () ;
pinMode (LED, OUTPUT) ;

for (;;)
{
digitalWrite (LED, HIGH) ; // On
delay (500) ; // mS
digitalWrite (LED, LOW) ; // Off
delay (500) ;
}
return 0 ;
}
Démarrage automatiques des programmes sous linux (cron)

Vous aimerez peut-être aussi