Jumelage France-Allemagne

A Propos de Nous

Information sur la Société

Lorem ipsum dolor sit amet, consectetur adipiscing elit. In auctor nisi vel leo ornare tincidunt. Pellentesque lacinia mauris ut est tristique eget lacinia nunc faucibus. Fusce porta bibendum sollicitudin. Sed nunc sapien, interdum eget eleifend id, tristique sit amet nisl. Mauris vitae ligula sapien, in elementum odio.

In molestie hendrerit quam, nec sagittis tortor aliquam gravida. Praesent eu risus scelerisque orci eleifend gravida. Curabitur enim erat, pulvinar eu ornare et, cursus ut leo. Donec semper varius lectus a feugiat. Fusce aliquet sollicitudin purus a rhoncus. Sed elit quam, accumsan vel egestas non, feugiat non sapien.

Expérience

Script de présentation
/*

 * Usage: ./send <numéro prise><command>
 * Command is 0 for OFF and 1 for ON

 * 
1 on - 327662 
01001111111111101110
1 off - 327679
01001111111111111111 

2 on -
01001111111101101100
2 off -
01001111111101111101
3 on -
01001111111110101111
3 off -
01001111111110111110
 *
 *
 */
#include "RCSwitch.h"
#include <stdlib.h> 
#include <stdio.h>

int main(int argc, char *argv[]) {
  /*
 * output PIN is hardcoded for testing purposes

 * see https://projects.drogon.net/raspberry-pi/wiringpi/pins/
 * for pin mapping of the raspberry pi GPIO connector
 */
int i = 0;
int PIN = 0;
int command = atoi(argv[1]);
if (wiringPiSetup () == -1) return 1;
RCSwitch mySwitch = RCSwitch();
mySwitch.setProtocol(3);
mySwitch.enableTransmit(PIN);
switch(command) {
        case 11: // 1 a ON
             for (i=1; i<10; i++) {
             mySwitch.send("01001111111111101110");
            delayMicroseconds(810);
            }
            break;
       case 10: // 1 a Off for (i=1; i<10; i++) { mySwitch.send("01001111111111111111"); delayMicroseconds(810); } break; case 21: // 2 a On for (i=1; i<10; i++) { mySwitch.send("01001111111101101100"); delayMicroseconds(810); } break; case 20: // 2 a Off for (i=1; i<10; i++) { mySwitch.send("01001111111101111101"); delayMicroseconds(810); } break; case 31: // 3 a ON for (i=1; i<10; i++) { mySwitch.send("01001111111110101111"); delayMicroseconds(810); } break; case 30: // 3 a Off for (i=1; i<10; i++) { mySwitch.send("01001111111110111110"); delayMicroseconds(810); } break; default: printf("./send Numéro Prise+1=On ou 0=Off"); return -1; } return 0; }

Témoignages

150

Employés

49

Compétences
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Titre du paragraphe

Lorem ipsum dolor sit amet, consectetur adipiscing elit.