Hirdetés
- iPhone topik
- Macrodroid
- Vivo X300 Pro – messzebbre lát, mint ameddig bírja
- Poco F8 Ultra – forrónaci
- Várhatóan ez a négy iPhone már nem telepítheti az iOS 27-et
- Honor Magic8 Pro - bevált recept kölcsönvett hozzávalókkal
- One mobilszolgáltatások
- Realme GT 2 - aláírjuk
- Mobil flották
- Samsung Galaxy A55 - új év, régi stratégia
-
Mobilarena
Amit érdemes tudni a Raspberry Pi-kről:
A legelső változat 2012-ben jelent meg. Pici, olcsó és nagyon alacsony fogyasztású, hobby-célú kártyagép. Felépítése ARM alapú, nem PC-architektúra, hanem kb. egy régi mobilhoz hasonló. Nagyon sok mindenre használható! A Linux-nak és a magas eladási mennyiségnek köszönhetően jelentős fejlesztőtáborral rendelkezik.
Új hozzászólás Aktív témák
-
Szita1
tag
válasz
Sk8erPeter
#14176
üzenetére
Köszi a kritikát, amin tudtam javítottam.
-
Szita1
tag
Rpi ből épített lakás vezérlő
Androidra ajtónyitás jelzés GCM üzenettel.
-
Szita1
tag
Sziasztok, rpi csomagtelepítésnél ez a hibaüzi fogadott, nem tudom hogy tudom javítani. Mi lehet a baj? megoldás?
üzi:
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libsemanage-common' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2) -
Szita1
tag
Ezeket az infókat szedtem ki most:
arm: frequency(45)=950100000
core: frequency(1)=250000000
h264: frequency(28)=250000000
isp: frequency(42)=249999000
v3d: frequency(43)=250000000
uart: frequency(22)=3000000
pwm: frequency(25)=0
emmc: frequency(47)=100000000
pixel: frequency(29)=0
vec: frequency(10)=108000000
hdmi: frequency(9)=0
dpi: frequency(4)=0core: volt=1.35V
sdram_c: volt=1.20V
sdram_i: volt=1.20V
sdram_p: volt=1.23Vvcgencmd measure_temp
temp=49.2'C -
Szita1
tag
Sziasztok, érdeklődnék mi a megoldás arra, hogy ne fagyon le a rendszer? néha semmit se lehet csinálni, putty is hibákat ír ki, nem reagál semmire sem.
Lehet egy olyan megoldás, ha újraindítom kihúzással akkor visszaáll egy alap állapotra?? Nem vagyok egy Linux guru, csak ötletelek a megoldáson.
Vagy egy USB pendriveról visszaállítás??
A segítséget előre is köszönöm.
-
Szita1
tag
Sziasztok, egy .sh fájlt hogy tudok futtatni hogy csak 50% procit használjon??
-
Szita1
tag
A küldött (sendTelegram(code) értékére lennék kiváncsi, hogy tudom ezt kiszámolni?? :S
receivedCode=530713;
period=125;//Copy the received code.
code = receivedCode & 0xFFFFF; //truncate to 20 bits for show; receivedCode is never more than 20 bits..//Add the period duration to the code. Range: [0..511] (9 bit)
code |= (unsigned long)period << 23;//Add the number of repeats to the code. Range: [0..7] (3 bit). The actual number of repeats will be 2^(repeats),
//in this case 8
code |= 3L << 20;//Retransmit the signal on pin 11. Note: no object was created!
RemoteTransmitter::sendTelegram(code,10);Ha ez sikerülne talán RCSwitchel tudnám küldeni a helyes kódot.
-
Szita1
tag
még hosszabb hibalista :S
pi@raspberrypi ~/433Utils $ make
g++ -c -o RemoteTransmitter.o RemoteTransmitter.cpp
RemoteTransmitter.cpp: In static member function ‘static void RemoteReceiver::init(int8_t, byte, RemoteReceiverCallBack)’:
RemoteTransmitter.cpp:29:55: error: ‘attachInterrupt’ was not declared in this scope
RemoteTransmitter.cpp: In static member function ‘static void RemoteReceiver::deinit()’:
RemoteTransmitter.cpp:45:29: error: ‘detachInterrupt’ was not declared in this scope
RemoteTransmitter.cpp: In static member function ‘static void RemoteReceiver::interruptHandler()’:
RemoteTransmitter.cpp:104:19: error: ‘B1110’ was not declared in this scope
RemoteTransmitter.cpp:107:19: error: ‘B1’ was not declared in this scope
RemoteTransmitter.cpp:119:26: error: ‘B1111’ was not declared in this scope
RemoteTransmitter.cpp:120:10: error: ‘B0101’ was not declared in this scope
RemoteTransmitter.cpp:124:10: error: ‘B1010’ was not declared in this scope
RemoteTransmitter.cpp:128:10: error: ‘B0110’ was not declared in this scope
make: *** [RemoteTransmitter.o] Error 1Nem értem Aurdinon gond nélkül ment
Pedig csak a sendTelegram kéne belőle valahogy, kár hogy a RCSwitch.cpp nem tud ilyet küldeni ... -
-
Szita1
tag
Itt a hibaüzi :
g++ -c -o RemoteTransmitter.o RemoteTransmitter.cpp
RemoteTransmitter.cpp: In static member function ‘static void RemoteTransmitter::sendTelegram(long unsigned int, byte)’:
RemoteTransmitter.cpp:54:47: error: ‘B111’ was not declared in this scope
RemoteTransmitter.cpp: In static member function ‘static void RemoteTransmitter::sendCode(byte, long unsigned int, unsigned int, byte)’:
RemoteTransmitter.cpp:72:28: error: ‘B111’ was not declared in this scope
RemoteTransmitter.cpp:80:19: error: ‘B11’ was not declared in this scope
make: *** [RemoteTransmitter.o] Error 1Mi baja lehet? :S
-
Szita1
tag
/*
* RemoteSwitch library v2.3.0 (20121229) made by Randy Simons http://randysimons.nl/
* See RemoteReceiver.h for details.
*
* License: GPLv3. See license.txt
*/
#include "RemoteReceiver.h"
/************
* RemoteReceiver
************/
int8_t RemoteReceiver::_interrupt;
volatile int8_t RemoteReceiver::_state;
byte RemoteReceiver::_minRepeats;
RemoteReceiverCallBack RemoteReceiver::_callback;
boolean RemoteReceiver::_inCallback = false;
boolean RemoteReceiver::_enabled = false;
void RemoteReceiver::init(int8_t interrupt, byte minRepeats, RemoteReceiverCallBack callback) {
_interrupt = interrupt;
_minRepeats = minRepeats;
_callback = callback;
enable();
if (_interrupt >= 0) {
attachInterrupt(_interrupt, interruptHandler, CHANGE);
}
}
void RemoteReceiver::enable() {
_state = -1;
_enabled = true;
}
void RemoteReceiver::disable() {
_enabled = false;
}
void RemoteReceiver::deinit() {
_enabled = false;
if (_interrupt >= 0) {
detachInterrupt(_interrupt);
}
}
void RemoteReceiver::interruptHandler() {
if (!_enabled) {
return;
}
static unsigned int period; // Calculated duration of 1 period
static byte receivedBit; // Contains "bit" currently receiving
static unsigned long receivedCode; // Contains received code
static unsigned long previousCode; // Contains previous received code
static byte repeats = 0; // The number of times the an identical code is received in a row.
static unsigned long edgeTimeStamp[3] = {0, }; // Timestamp of edges
static unsigned int min1Period, max1Period, min3Period, max3Period;
static bool skip;
// Filter out too short pulses. This method works as a low pass filter.
edgeTimeStamp[1] = edgeTimeStamp[2];
edgeTimeStamp[2] = micros();
if (skip) {
skip = false;
return;
}
if (_state >= 0 && edgeTimeStamp[2]-edgeTimeStamp[1] < min1Period) {
// Last edge was too short.
// Skip this edge, and the next too.
skip = true;
return;
}
unsigned int duration = edgeTimeStamp[1] - edgeTimeStamp[0];
edgeTimeStamp[0] = edgeTimeStamp[1];
// Note that if state>=0, duration is always >= 1 period.
if (_state==-1) { // Waiting for sync-signal
if (duration>3720) { // =31*120 minimal time between two edges before decoding starts.
// Sync signal received.. Preparing for decoding
period=duration/31;
receivedCode=previousCode=repeats=0;
// Allow for large error-margin. ElCheapo-hardware :(
min1Period=period*4/10; // Avoid floating point math; saves memory.
max1Period=period*16/10;
min3Period=period*23/10;
max3Period=period*37/10;
}
else {
return;
}
} else if (_state<48) { // Decoding message
receivedBit <<= 1;
// bit part durations can ONLY be 1 or 3 periods.
if (duration<=max1Period) {
receivedBit &= B1110; // Clear LSB of receivedBit
}
else if (duration>=min3Period && duration<=max3Period) {
receivedBit |= B1; // Set LSB of receivedBit
}
else { // Otherwise the entire sequence is invalid
_state=-1;
return;
}
if ((_state%4)==3) { // Last bit part?
// Shift
receivedCode*=3;
// Only 4 LSB's are used; trim the rest.
switch (receivedBit & B1111) {
case B0101: // short long short long == B0101
// bit "0" received
receivedCode+=0; // I hope the optimizer handles this ;)
break;
case B1010: // long short long short == B1010
// bit "1" received
receivedCode+=1;
break;
case B0110: // short long long short
// bit "f" received
receivedCode+=2;
break;
default:
// Bit was rubbish. Abort.
_state=-1;
return;
}
}
} else if (_state==48) { // Waiting for sync bit part 1
// Must be 1 period.
if (duration>max1Period) {
_state=-1;
return;
}
} else { // Waiting for sync bit part 2
// Must be 31 periods.
if (duration<period*25 || duration>period*36) {
_state=-1;
return;
}
// receivedCode is a valid code!
if (receivedCode!=previousCode) {
repeats=0;
previousCode=receivedCode;
}
repeats++;
if (repeats>=_minRepeats) {
if (!_inCallback) {
_inCallback = true;
(_callback)(receivedCode, period);
_inCallback = false;
}
// Reset after callback.
_state=-1;
return;
}
// Reset for next round
receivedCode = 0;
_state=0; // no need to wait for another sync-bit!
return;
}
_state++;
return;
}
boolean RemoteReceiver::isReceiving(int waitMillis) {
unsigned long startTime=millis();
int waited; // Signed int!
do {
if (_state == 48) { // Abort if a valid code has been received in the mean time
return true;
}
waited = (millis()-startTime);
} while(waited>=0 && waited <= waitMillis); // Yes, clock wraps every 50 days. And then you'd have to wait for a looooong time.
return false;
} -
Szita1
tag
Sziasztok, kérdésem lenne,fizzilogic 433Mhz , Aurdinora van írva egy RemoteTransmitter.cpp és ..h Szeretném valahogy RPire átfordítani de a g++ hibákat ad ki
Mi lehet a gondja?
Új hozzászólás Aktív témák
Hirdetés
- Eladó jogtiszta, Windows 11/10, Office 2019/2021/2024, Fizikai és Digitális licencek, Számlával.
- 7.Gen E-Sport Gamer - 16GB DDR4 - I5 7500 - GTX 1050Ti 4GB - 128GB SSD - 500GB HDD
- Full HD Gamer PC / Intel i7 6700K / GTX 1080 8GB / 16GB DDR4 / 500GB SSD / Garancia
- ASROCK AM4 RYZEN 5 2400G GAMER OPTIMUM PC 16DDR4 512GB NVME SSD GTX 1060 3GB DDR5 600W-TÁP AC-WIFI!
- ÚJ AMD 1080/1440p Gamer : Ryzen 5 5600 / 16GB DDR4 / RX 7600 8GB / 500GB SSD / 500GB HDD
- GAMER PC! Ryzen 3900X / RX 7600XT 16GB / B550 / 32GB DDR4 / 500GB NVMe! BeszámítOK
- REFURBISHED és ÚJ - HP USB-C/A Universal Dock G2 (5TW13AA) (DisplayLink)
- Razer Cobra Lightweight Minecraft Edition RGB Gaming Egér!
- 27% - ASUS TUF Gaming VG27AQ1A IPS Monitor! 2560x1440 / 170Hz / 1ms / G-Sync / FreeSync
- Gaming PC! Ryzen 5700X / RTX 3070 / B550 / 32GB 2666Mhz / 512GB NVMe / 850w Gold! BeszámítOK
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


Pedig csak a sendTelegram kéne belőle valahogy, kár hogy a RCSwitch.cpp nem tud ilyet küldeni ...
wassermann
