Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Macías danimaciasperea

View GitHub Profile
@danimaciasperea
danimaciasperea / RFWrapper.php
Created Jun 22, 2018
PHP Wrapper to send RF 433 Mhz commands using rpi-rf_send module.
View RFWrapper.php
<?php
function sendRF($lightId, $lightStatus) {
// 0, 1, 2, 3, 4, 5, 6
// entrada, lectura, tv, calduino, verde, deshumidificador, multiusos
$lightCode= array( 6, 10, 14, 83028, 86100, 70740, 21588);
$lightCodeDuration= array(205, 205, 205, 355, 355, 355, 355);
$sem_id = sem_get(RF_SEMAPHORE);