Hirdetés
-
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
-
ddudas
tag
válasz
Szita1 #10929 üzenetére
Ez azt jelenti, hogy a \root\var\lib\dpkg\info mappában található (a hibaüzenetben megnevezett) fájlban hiányzik az utolsó \n. Elsőre az lenne a tippem, hogy csomagfrissítés közben valamiért újraindult a pi, és megsérültek az itt található fájlok. Nem történt semmi ehhez hasonló?
Tehetsz egy próbát a javításra, küldök egy python scriptet PÜ-ben. De sajnos látok rá esélyt, hogy hiába minden próbálkozás...
-
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 -
bigdee888
tag
Azert azok is fogyasztanak valamicsket.
Ugye 5V*1A=5W; a ket RF modul mondjuk fogyaszt 1W-ot, a hangkartya (csak tippre ugyanannyit), akkor a Raspberry-nek mar csak 3W marad...
Ha fagyogat ezekkel a cuccokkal is, akkor azokat is szedd le szerintem rola es ugy is teszteld.
Ha csak onmagaban is fagyogat, akkor minden ujratelepitenek, vagy talan egy masik memoriakartyat probalnek ki.(Ezert is lathatod, hogy az 500mA vajmi keves sajnos.)
-
azbest
félisten
Közben párszor átszerkesztettem, az elején a link, hogy melyik Bxxx-nek mi az értéke. Valójában sima számok, amik csak azért vannak bináris Bxxx alakban írva, mert lehet így olvashatóbb bináris műveleteknél a forráskód
Azt mondjuk nem tudom, hogy ha lefordul, akkor a rapsi pinjei mennyire feleltethetőek meg ennek. Talán a gpio sorszám lehet az, ha arduinon azt jelentette.
-
azbest
félisten
Gondolom, mert az egy arduino specifikus, csak az ottani környezetben definiált érték. Ha csak ezen múlik odaírhatod az elejére azokat az érték definiálásokat.
De mivel a googli a barátom, ezért rákerestem és megtaláltam az oldalát , ahol az első mondat
There is a port available for Rasperry Pi: https://github.com/r10r/rcswitch-pi
szerk: viszont lehet benéztem és ez nem pont az amelyiket te mutattad -
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
/*
* 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;
}
Új hozzászólás Aktív témák
Hirdetés
- Gigabyte GA-Z170M-D3P/i7-6700/16 gb DDR4 (KÜLÖN is)
- i5 ös Fuji pc
- Jó áras PC! , i7 10700 , 1080 8GB , 16GB DDR4 , 512 GB NVME , 500GB HDD
- GAMER FÉLKONFIG: GIGABYTE B550, R7 5800X,TUF 5700XT, 16GB RAM, 500GB M.2, 1 TB hdd -- BESZÁMÍTÁS!
- Core i7 Gamer PC: -8Gb Videokártya -16GB RAM -RGB ház -6 hó garancia
- HP Z6 G4: Intel Xeon Gold 6148 (40 szál, 3,7GHz), 32GB DDR4 ECC, 512GB NVMe SSD, Win 11 Pro
- Eladó komplett Ryzen 5-ös Gamer konfiguráció!
- Mini PC INTEL NUC i5/16GB RAM/120GB SSD/WIFI
- I7 8700k Gigabyte Z370P D3 alaplap 16gb ddr4 ram
- Gamer PC - i7-8700K - Z370 - RTX 3060TI - 16GB DDR4 - 240 SSD(ÚJ) - 2TB HDD(ÚJ)
- Xiaomi Redmi 13C 128GB, Kártyafüggetlen, 1 Év Garanciával
- ÁRGARANCIA!Épített KomPhone i5 12400F 16/32/64GB RAM RTX 4060 8GB GAMER PC termékbeszámítással
- AKCIÓ! Lenovo Thinkpad P15 Gen1 15 FHD notebook - i7 10750H 16GB RAM 512GB SSD Quadro T1000 W11
- ÁRGARANCIA! Épített KomPhone Ryzen 7 5800X 16/32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- Samsung Galaxy Tab A8 32GB, Újszerű, 1 Év Garanciával
Állásajánlatok
Cég: Laptopszaki Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest