Hallo Community , habe via Arduino , Photosensor und MHZ Sender das Licht in der Halle geschalten. Das möchte ich nun via Raspberry machen . Allerdings funktionieren viele Anleitungen im Netz nicht mehr !!
Jemand ne Idèe oder einen Plan ???
Hallo Community , habe via Arduino , Photosensor und MHZ Sender das Licht in der Halle geschalten. Das möchte ich nun via Raspberry machen . Allerdings funktionieren viele Anleitungen im Netz nicht mehr !!
Jemand ne Idèe oder einen Plan ???
Mal im Forum nach ioBroker suchen Da habe ich eine Anleitung gemacht, wie Einsätze empfangen werden können. Das ist eine IOT-Smarthome Anwendung, was ziemlich leicht und geil ist und auf ein PI läuft
Damit kannst du die Ausgänge vom PI an den Adruino anschließen oder ggf. direkt eine Arduino Schnittstelle suchen.
Oh vielen Dank😁, habe es aber fast kann schon den MHZ code Empfangen und die Lichtstärke messen via Python.
Hab nur noch das Problem das , das senden DES 433MHZ Codes nicht funktioniert .
Hab neue Sender mit Antenne bestellt.
Mal sehen ob es dann klappt.
Also mit neuen Sender Funktioniert auch nicht , könnte mal jemand über den Code schauen was da nicht Stimmt??
WiringPi pin ( int PIN = 0 ) ist GPIO PIN 17
pi@raspberrypi:~/433Utils/RPi_utils $ ./codesend 12272812
sending code[12272812]
/*
Usage: ./codesend decimalcode [protocol] [pulselength]
decimalcode - As decoded by RFSniffer
protocol - According to rc-switch definitions
pulselength - pulselength in microseconds
'codesend' hacked from 'send' by @justy
- The provided rc_switch 'send' command uses the form systemCode, unitCode, command
which is not suitable for our purposes. Instead, we call
send(code, length); // where length is always 24 and code is simply the code
we find using the RF_sniffer.ino Arduino sketch.
(Use RF_Sniffer.ino to check that RF signals are being produced by the RPi's transmitter
or your remote control)
*/
#include "../rc-switch/RCSwitch.h"
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
// This pin is not the first pin on the RPi GPIO header!
// Consult https://projects.drogon.net/raspberry-pi/wiringpi/pins/
// for more information.
int PIN = 0;
// Parse the first parameter to this command as an integer
int protocol = 0; // A value of 0 will use rc-switch's default value
int pulseLength = 0;
// If no command line argument is given, print the help text
if (argc == 1) {
printf("Usage: %s decimalcode [protocol] [pulselength]\n", argv[0]);
printf("decimalcode\t- As decoded by RFSniffer\n");
printf("protocol\t- According to rc-switch definitions\n");
printf("pulselength\t- pulselength in microseconds\n");
return -1;
}
// Change protocol and pulse length accroding to parameters
int code = atoi(argv[1]);
if (argc >= 3) protocol = atoi(argv[2]);
if (argc >= 4) pulseLength = atoi(argv[3]);
if (wiringPiSetup () == -1) return 1;
printf("sending code[%i]\n", code);
RCSwitch mySwitch = RCSwitch();
if (protocol != 0) mySwitch.setProtocol(protocol);
if (pulseLength != 0) mySwitch.setPulseLength(pulseLength);
mySwitch.enableTransmit(PIN);
mySwitch.send(code, 24);
return 0;
}
[tt]<span id="selection-marker-1" class="redactor-selection-marker woltlab-bbcode-marker"></span>[/tt][tt]<span id="selection-marker-1" class="redactor-selection-marker woltlab-bbcode-marker"></span>[/tt]
Alles anzeigen