Outils pour utilisateurs

Outils du site


arduino:radiosenseurs

Des senseurs sur arduino / radio

MATOS

Complets ( integre le micro-controleur ):

plate-forme olimex encore

On y reviens…du EXTR avec tiny AVR pour qlq euros

Avec un couplage d'une platine grove :) http://www.seeedstudio.com/wiki/GROVE_System

Sans le micro-controleur ):

Expérimentations

NRF24L01

ref :

NRF24 vue avec les connexions sur le dessus

-----   -----
I   I   I   I
I   I   I   I
 ::::     8642
-----     7531
IRQ(NC 8)MOSI (6)CSN (4)VCC (2)
MISO 7SCK 5CE 3GND 1
VCC      -> Arduino 5V 
CE   (3) -> 8
CSN  (4) -> 7
SCK  (5) -> 13
MOSI (6) -> 11
MISO (7) -> 12

Jeenode

Senseur qui est du Lux

  1. brancher le jeelink
  2. séquence d'initialisation , groupe 100, node 1 , 863MHz : taper : 100g 1i 8b
    1. le jeelink affiche :“OK G100 1 152”
  3. Sur le jeenode usb charger le code suivant ( c'est un arduino uno ) :
/// test de senseur lumiere sur jeenode port P1
/// base test ldr qui pourrait reservir
/// jeenode usb v5 (= arduino uno,57600 )

#include <Ports.h>
#include <RF12.h>
#include <JeeLib.h>

#define LDR 0 // the LDR will be connected to AIO1, i.e. analog 0
    
PortI2C myBus (1);
LuxPlug sensor (myBus, 0x39);
byte highGain;
const byte LED = 9;
// turn the on-board LED on or off
static void led (bool on) {
  pinMode(LED, OUTPUT);
  digitalWrite(LED, on ? 0 : 1); // inverted logic
}

void setup () {
  // this is node 1 in net group 100 on the 868 MHz band
  rf12_initialize(1, RF12_868MHZ, 100);
  bitSet(DDRB, 0);
  bitClear(PORTB, 0);
  sensor.begin();
    Serial.begin(57600);
    Serial.println("\n[lux]");
  // need to enable the pull-up to get a voltage drop over the LDR
//  pinMode(14+LDR, INPUT);
//  digitalWrite(14+LDR, 1); // pull-up
}
  
void loop () {
   led(true);

// measure analog value and convert the 0..1023 result to 255..0
//  byte value = 255 - analogRead(LDR) / 4;
// recup lux
    const word* photoDiodes = sensor.getData();
// recup lux
    byte value = sensor.calcLux();
// actual packet send: broadcast to all, current counter, 1 byte long
    rf12_sendNow(0, &value, 1);
    Serial.print(value);
    Serial.println(" ,n=1, g=100, RF12_868MHZ");
    highGain = ! highGain;
    sensor.setGain(highGain);
    led(false);
    delay(1000);

  // let one second pass before sending out another packet
  delay(1000);
}

Devduino

arduino compatible et autres

Tiny

Olimexino

arduino/radiosenseurs.txt · Dernière modification : 2024/02/09 17:10 de 127.0.0.1