Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: Cheap way to make/buy waterproof temperature sensor on: October 01, 2012, 02:49:17 pm
Yes it is cheap but I want something not home made. I found Waterproof stainless DS18B20 for 3 pounds so it's cheap smiley
2  Using Arduino / Sensors / Cheap way to make/buy waterproof temperature sensor on: September 30, 2012, 07:10:16 am
Hey, I want to make information system for my home central heating. I am searching something like thermocouple but digital(or analog) and waterproof. I want use 7 of them so I am searching cheapest way to do so.

Thanks for help
3  Using Arduino / Networking, Protocols, and Devices / Re: Two SPI on Arduino UNO? on: June 14, 2012, 07:28:15 am
Why I must pin 5 be as output? I dont use this pin.
4  Using Arduino / Networking, Protocols, and Devices / Re: Two SPI on Arduino UNO? on: June 13, 2012, 03:29:22 pm
I connect rfm70 and st7565r and I wrote program:

Code:
#include <TouchScreen.h>
#include <Dogm.h>

//Wireless----------------------------------------------------
#include "RFM70.h"

RFM70class RFM70;
byte RFM70_buf[MAX_PACKET_LEN];  //RFM70 data buffer
unsigned long RFMSendTime = 0;   //next send time
int RFMSendSpeed=1;           //send packet every 1000 msec
//------------------------------------------------------------
int a0Pin = PIN_A0_DEFAULT;
Dogm dogm(7);

TouchScreen ts(3, 1, 0, 2);
int s,t = 0;              // s {10 - 100}  t {5 - 55}
int car_speed, car_turn = 0;  //car_speed {5 - 95 } car_turn {3 - 53}
int coords[2];


void setup(void){
 
  Serial.begin(9600);
  dogm.setContrast(10);
  //Wireless----------------------------------------------------
  RFM70.begin();
  RFM70.Initialize();
  RFMSendTime = millis();
  //------------------------------------------------------------
  pinMode(10, OUTPUT);
  pinMode(6, OUTPUT);
}

void read_speed(){
  if((coords[0] > 200) && (coords[0] < 800) && (coords[1] > 200) && (coords[1] < 815)) {
      Serial.print(", Speed:");
        s = constrain(map(coords[0], 200, 800, 10, 100), 10, 100);
        t = constrain(map(coords[1], 200, 800, 5, 55), 5, 55);
      Serial.print(s);
      Serial.print(":");
      Serial.println(t);
  }
}


void draw(){
    dogm.setHLine(20,110,30);  //speed
    dogm.setVLine(65,8,55);    // turn
   
    dogm.setVLine(120,0,63); 
    dogm.setHLine(0,119,5);
    dogm.setHLine(0,119,60); 
   
//wykrywanie przeszkód
/*if ( lewo == true ){
dogm.setBox(0,61,119,63);  // góra , czyli przeszkoda po lewej   
}

if (przodek == true){
dogm.setBox(121,0,127,63); 
}

if ( prawo == true ) {
dogm.setBox(0,0,119,4);
}  */
   
    dogm.setBox(115 - s,58-t,125 - s,64-t);

}
void loop(){
 
  DOG_PGM_P p;
  // zczytanie z panelu
  ts.read(coords);
  Serial.print(coords[0]);
  Serial.print(",");
  Serial.println(coords[1]);
 
  // komunikacja
 
  [b]digitalWrite(10,LOW);[/b]
  dogm.start();
  do{
  digitalWrite(10,LOW);
    read_speed();
    draw();
    car_speed = 115 - s;   //car_speed {5 - 95 } car_turn {3 - 53}
    car_turn =  58 - t;
  [b]digitalWrite(10,HIGH);  [/b]
   
   [b] digitalWrite(6,LOW);[/b]
    rfmTask();
 
    if (millis() > RFMSendTime)                   //send packet
    {                                                   
      RFMSendTime = millis() + RFMSendSpeed;
      RFM70_buf[0]=0X41;     
      RFM70_buf[1]=0X42;
      RFM70_buf[2]=0X43;
      RFM70_buf[3]=0X44;           
      RFM70.Send_Packet(WR_TX_PLOAD,RFM70_buf,3); 
    }
 [b] digitalWrite(6,HIGH);[/b]
 
  } while (dogm.next() );
 
 
}

void rfmTask()                //RFM70 event handler
{
  if (RFM70.RfmInterrupt())
  {
    if (RFM70.TxDataSentInterrupt())
    {
       Serial.println("Data sent OK");
       RFM70.SwitchToRxMode();
    }
    if (RFM70.TxDataSentErrorInterrupt())
    {
       Serial.println("Data sent error");
       RFM70.SwitchToRxMode();
    }
  }
}

On pin 10 i have chip select display, on pin 6 i have chip select RFM70. And only display working. I dont know what I doing wrong.
5  Using Arduino / Networking, Protocols, and Devices / Re: Two SPI on Arduino UNO? on: June 13, 2012, 12:05:58 pm
Okey, I try change PIN_SS of st7565r but I have big problem. When I use deafult chip select pin (10) SCK is working normally when I changed PIN_SS to 5 SCK doesnt work(led diode stops blink).

I change values in dogm128.h in section #ifndef ADA_ST7565P_HW .

When I change only PIN_A0_DEFAULT to another I/O pin then it is working.

6  Using Arduino / Networking, Protocols, and Devices / Re: Two SPI on Arduino UNO? on: June 13, 2012, 09:45:23 am
So if I want to choose one of the device I can do something like this?
Code:
...
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
...
When RFM70 CS pin is connect to arduino pin 2 if I choose it I disable ST7565R?

7  Using Arduino / Networking, Protocols, and Devices / Two SPI on Arduino UNO? on: June 12, 2012, 04:01:39 pm
Hello , I have problem because I want to connect two device to my arduino. First is wireless module RFM70 and graphic display ST7565R. Both are with SPI interface.

I am using DOGM128 library for display and code for RFM70 from here

RFM70
ST7565R
8  Using Arduino / Networking, Protocols, and Devices / Re: noob confuse with SPI - setSS() missing / RFM70 module on: June 06, 2012, 09:35:50 am
Hello sbright33,

here is the link to the library: skip.co.at/RFM70/RFM70.zip
unpack it to C:\Program Files (x86)\arduino-1.0\libraries\RFM70.

Pinout:
CE   Pin 9
CSN  Pin 10
SCK  Pin 13
MISO Pin 12
MOSI Pin 11
IRQ  Pin 8

and don't forget the 3.3 V stepdown converter!

Please ask me if you have any questions!

Example code (not all was tested):
Code:
#include "RFM70.h"

RFM70class RFM70;

byte RFM70_buf[MAX_PACKET_LEN];  //RFM70 data buffer
unsigned long RFMSendTime = 0;   //next send time
int RFMSendSpeed=1000;           //send packet every 1000 msec


void setup()
{
    Serial.begin(57600); 
    Serial.println("Arduino Start");   
    RFM70.begin();
    RFM70.Initialize();
    RFMSendTime = millis();
 
}

void loop()
{
    rfmTask();                                    //check for RFM70 event in polling mode
    if (millis() > RFMSendTime)                   //send packet
    {                                                   
      RFMSendTime = millis() + RFMSendSpeed;
      RFM70_buf[0]=0X41;     
      RFM70_buf[1]=0X42;
      RFM70_buf[2]=0X43;
      RFM70_buf[3]=0X44;     
      RFM70.Send_Packet(WR_TX_PLOAD,RFM70_buf,4);
      Serial.println("Sending data");       
    } 
}

void rfmTask()                //RFM70 event handler
{
  if (RFM70.RfmInterrupt())
  {
    if (RFM70.TxDataSentInterrupt())
    {
       Serial.println("Data sent OK");
       RFM70.SwitchToRxMode();
    }
    if (RFM70.TxDataSentErrorInterrupt())
    {
       Serial.println("Data sent error");
       RFM70.SwitchToRxMode();
    }
    if (RFM70.RxDataReadyInterrupt())
    {
       Serial.println("Data received: ");
       byte rx_len = RFM70.Receive_Packet(RFM70_buf);
       if (rx_len)
       {
          for(byte i=1;i<rx_len;i++)
          {
            Serial.print(i);
            Serial.print("->");
            Serial.println(RFM70_buf[i]);
          }         
       }   
     }
  }
}




This is code for transmitting? How recive? I have 2 arduino's and 2 rfm70 mnodule.
9  Using Arduino / Networking, Protocols, and Devices / Re: RFM70 sample codes for transmitter and receiver on: May 27, 2012, 02:27:47 am
Those are my modules - http://www.hoperf.com/rf_fsk/24g/rfm70.htm
10  Using Arduino / Networking, Protocols, and Devices / RFM70 sample codes for transmitter and receiver on: May 23, 2012, 12:11:25 pm
Hello,
I have two arduino and two rfm70 module. I want to test communication between arduinos but I cant find any sample programs for master and slave(transmitter and receiver) Can someone help me?

11  Using Arduino / Microcontrollers / Re: Using arduino board like programmer in AVR Studio on: April 26, 2012, 06:00:23 am
So is there possible to using arduino board like USBasp?
12  Using Arduino / Microcontrollers / Using arduino board like programmer in AVR Studio on: April 24, 2012, 05:29:16 am
Hello ,is there possible to replace atmega with arduino bootloader to "clean" atmega 328P(without arduino bootloader) on board and program it with avr studio in C? I checked this tutorial - http://www.jayconsystems.com/forum/viewtopic.php?f=15&t=18 but i must have arduino bootloader on atmega.

Thanks
13  Using Arduino / Interfacing w/ Software on the Computer / Using arduino board like programmer for another atmega on: April 15, 2012, 10:16:17 am
Hello ,is there possible to replace atmega with arduino bootloader to "clean" atmega 328P on board and program it with avr studio in C? I checked this tutorial - http://www.jayconsystems.com/forum/viewtopic.php?f=15&t=18 but i must have arduino bootloader on atmega.

Thanks smiley
14  Using Arduino / Microcontrollers / Re: Arduino on breadboard and dont work with external crystal on: November 20, 2011, 10:18:10 am
I upload sketch to atmega when it was in arduino then i extract it and put in breadboard.
15  Using Arduino / Microcontrollers / Arduino on breadboard and dont work with external crystal on: November 17, 2011, 11:11:17 am
Hello i use manual from this site - http://arduino.cc/en/Main/Standalone and everything work but when I connect external crystal everything stops, no blinking. When I disconnect crystal and reset arduino on breadboard everything works fine.

I dont know what is wrong.
Pages: [1] 2