Show Posts
Pages: 1 ... 84 85 [86] 87 88 ... 153
1276  Using Arduino / Networking, Protocols, and Devices / Re: Reverse Engineer I2C message Help.. on: February 05, 2013, 11:16:31 am
Looking at the BOM and the schematic supplied on the site you linked to the chip is a MCP23008 (Datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/21919e.pdf) Maybe no need to reverse engineer!
1277  Using Arduino / Programming Questions / Re: Averaging Digital input. on: February 05, 2013, 09:30:12 am
This is untested code but maybe something like this? The last 16 times (unsigned int) through the loop must match for reading to count as high or low. You could maybe use unsigned long if the loop is tight so you need 32 matching readings or byte for only 8 readings.

Code:
unsigned int readBits = 0;

void loop(){
  readBits = readBits << 1;
  if (digitalRead(WetDry) == HIGH) {
    bitSet(readBits,0);
  }
  // Do other stuff

  switch (readBits) {
    case 0xFFFF:
    // Set
      break;
    case 0x0:
    // Clear
      break;
    case default:
    // Not valid (do nothing)
      break;
  }
}
1278  Using Arduino / Project Guidance / Re: Read data using external clock? on: February 05, 2013, 05:38:11 am
Assuming your using the same code you posted above, does the Serial.write in the ISR cause problems?
Code:
ISR(SPI_stc_vect)  {
  data = SPDR;
  Serial.write(data);
}
1279  Community / Bar Sport / Re: SkyNet on: February 05, 2013, 04:14:19 am
As the arduino is a microcontroller and not a super computer maybe it need to aim a bit lower and be called Fishnet or Hairnet instead of Skynet?  smiley-lol
1280  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 04, 2013, 12:59:12 pm
Quote
Also, about CRC.
Assuming it's again LLLLHHHH, the only values I see on LLLL are:
Code:
0000 - dec: 0
0001 - dec: 1
1000 - dec: 8
1001 - dec: 9
I'm tending to agree with you here. I would expect a true CRC value to be a lot more random. Maybe greater minds than ours can enlighten us!
1281  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 04, 2013, 12:37:41 pm
The CRC has me stumped.  smiley-sad-blue Though it might not be a CRC! Program code I wrote should be fairly robust as it reports 2x consecutive matching reads.
But here is what I see sofar.
Code:
Temp*C RH% ?? DeviceID BC CH Temperature- Humidity --CRC?--
              Rnd Num- BB XX LLLLMMMMHHHH LLLLHHHH
 7,1*C 93% 00 01010111 01 01 001101000101 11010101 10011000
 7,3*C 92% 00 01010111 01 01 011101000101 11000101 10010110
 7,3*C 92% 00 01010111 01 01 011101000101 11000101 10010110
 8.1*C 91% 00 01010111 10 01 010101010101 10110101 10010001
 9.0*C 90% 00 01010111 10 01 011001100101 10100101 10011000
 9.2*C 88% 00 01010111 10 01 100101100101 10000101 10010110
10.3*C 85% 00 01010111 10 01 111001110101 01010101 00010001
10.6*C 85% 00 01010111 10 01 001010000101 01010101 10011010
10.9*C 84% 00 01010111 10 01 100110000101 01000101 10010000
11.8*C 83% 00 01010111 10 01 100010010101 00110101 10011100
11.9*C 83% 00 01010111 10 01 101110010101 00110101 10010110
12.2*C 81% 00 01010111 10 01 000010100101 00010101 10010101
12.6*C 79% 00 01010111 10 01 011010100101 11110100 10010010
13.2*C 75% 00 01010111 10 01 000110110101 10110100 10010110
13.4*C 75% 00 01010111 10 01 011010110101 10110100 10010111
13.7*C 75% 00 01010111 10 01 101010110101 10110100 00010001 (no force)
13.9*C 75% 00 01010111 10 01 111010110101 10110100 10010010
14.2*C 75% 00 01010111 10 01 001111000101 10110100 00011100 (no force)
14.4*C 75% 00 01010111 10 01 011111000101 10110100 10011111
14.6*C 75% 00 01010111 10 01 101111000101 10110100 10010001
14.6*C 75% 00 01010111 10 01 101111000101 10110100 00011001 (no force)
14.8*C 75% 00 01010111 10 01 111111000101 10110100 10011010
15.3*C 73% 00 01010111 10 01 011111010101 10010100 10010111
16.2*C 67% 00 01010111 10 01 011111100101 00110100 10010101
16.6*C 64% 00 01010111 10 01 111111100101 00000100 00010111 (no force)
16.9*C 66% 00 01010111 10 01 010111110101 00100100 00010110 (no force)
17.2*C 65% 00 01010111 10 01 101011110101 00010100 00011101
17.4*C 64% 00 01010111 10 01 111011110101 00000100 00010011 (no force)
17.6*C 63% 00 01010111 10 01 000000000110 11110011 00010001
17.7*C 61% 00 01010111 10 01 001100000110 11010011 10011001
17.9*C 60% 00 01010111 10 01 011100000110 11000011 00011111
CH 1 ------                                        
18.0*C 58% 00 01010111 10 00 100000000110 10100011 10010100
18.2*C 58% 00 01010111 10 00 110000000110 10100011 00010111
CH 2 ------                                        
19.0*C 56% 00 01010111 10 01 101000010110 10000011 10011010
19.2*C 56% 00 01010111 10 01 110100010110 10000011 10011011
19.2*C 56% 00 01010111 10 01 110100010110 10000011 00010011
19.3*C 56% 00 01010111 10 01 000000100110 10000011 10010101
19.5*C 55% 00 01010111 10 01 001100100110 01110011 00010001
19.7*C 55% 00 01010111 10 01 011000100110 01110011 10010100
19.8*C 54% 00 01010111 10 01 100000100110 01100011 10010011
19.9*C 55% 00 01010111 10 01 101000100110 01110011 10011010
20.0*C 55% 00 01010111 10 01 110000100110 01110011 10011101
20.1*C 54% 00 01010111 10 01 111000100110 01100011 10010100
20.1*C 54% 00 01010111 10 01 111000100110 01100011 10010100
CH 3 ------                                        
18.4*C 59% 00 01010111 10 10 111100000110 10110011 10010111
18.6*C 57% 00 01010111 10 10 001000010110 10010011 10010111
18.7*C 56% 00 01010111 10 10 010100010110 10000011 10010011
                                                  
20.1*C 47% 00 01010111 10 01 110100100110 11110010 10010110
20.1*C 47% 00 01010111 10 01 110100100110 11110010 00011110
20.1*C 48% 00 01010111 10 01 111000100110 00000011 00010001 (no force)
20.2*C 48% 00 01010111 10 01 111100100110 00000011 10011111
20.2*C 47% 00 01010111 10 01 000000110110 11110010 10011100
                                                  
20.0*C 44% 00 01010111 10 00 110000100110 11000010 00011101 CH1
20.0*c 44% 00 01010111 10 01 110000100110 11000010 00010111 CH2
20.1*C 44% 00 01010111 10 10 111000100110 11000010 10011110 CH3
                                                  
           00 00101111 10 01 001000110110 01110010 00001010 BATTERY + OLD NI-MH accu BATTERY [station DOESNT show this as a 'weak battery']
           00 10101101 00 01 110000110110 01010010 10001010 USED BATTERY
           00 11110101 00 01 011101000110 01000010 10001011 ONE USED AND ONE GOOD BATTERY
           00 10100100 00 01 110001000110 00110010 10000110 AND BACK TO GOOD BATTERY (pair which I used for all measures)

           00 10100100 00 01 110001000110 00110010 10000110
           00 10100100 00 01 110001000110 00110010 10000110
           00 10100100 00 01 110001000110 00110010 10000110
           00 10100100 00 01 110001000110 00110010 10000110
           00 10100100 00 01 110001000110 00110010 10000110
           00 10100100 00 01 110001000110 00110010 00001110
           00 10100100 00 01 110001000110 00010010 00000100
           00 10100100 00 01 110001000110 00010010 00000100
           00 10100100 00 01 110001000110 00010010 00000100
           00 10100100 00 01 110001000110 00010010 00000100
           00 10100100 00 01 110001000110 00000010 00000001
           00 10100100 00 01 110001000110 00000010 00000001
           00 10100100 00 01 110101000110 11110001 00000100
           00 10100100 00 01 110101000110 11110001 00000100
           00 10100100 00 01 110101000110 11110001 00000100
           00 10100100 00 01 110101000110 11110001 00000100
           00 10100100 00 01 111001000110 11100001 00001011
           00 10100100 10 01 111001000110 11100001 00000100
           00 10100100 10 01 111001000110 11100001 00000100
           00 10100100 10 01 111001000110 11100001 00000100
           00 10100100 10 01 000001010110 11100001 00000100
           00 10100100 10 01 000001010110 11100001 00000100
           00 10100100 10 01 000001010110 11110001 00000001
           00 10100100 10 01 000001010110 11100001 00000100
           00 10100100 10 01 000001010110 11100001 00000100
           00 10100100 10 01 000001010110 11100001 00000100
           00 10100100 10 01 000101010110 11100001 00000010
           00 10100100 10 01 001001010110 11100001 00001000
           00 10100100 10 01 001001010110 11100001 00001000
           00 10100100 10 01 001001010110 11100001 00001000
           00 10100100 10 01 001001010110 11100001 00001000
           00 10100100 10 01 001101010110 11100001 00001110
           00 10100100 10 01 010001010110 11010001 00000000
           00 10100100 10 01 011001010110 11010001 00001100
          
1282  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 04, 2013, 08:13:09 am
CH is indeed 3 position switch behind the sensor. Currently I use it on CH2 because on CH1 there's some sensor near used by neighbour and i got 2 readings (but can't reach them lately).
The device ID - look at the google document here: https://docs.google.com/document/d/121ZH3omAZsdhFi3GSB-YdnasMjIQSGIcaS7QW6KsACA/edit
I've marked yellow the moment, that (what you assume BC is) changes.
Batteries didn't change by that moment, the only thing that changed was the sensor was held by me in hand and I was pushing "transmit" button all the time to get near-readings every fewteen seconds.
Cold temperatures degrade the battery output. You did not change the batteries but the temperature is steadily climbing and the batteries power output with it. This is probably why the BC condition changed like this.

The other thing is, that on the most of the readings on that document i cut out all leading 'zeroes' which i assume was a mistake now.
The data packet looks to be 40 or 42 bits long (see image) so as long as your keep 42 bit there is no problem trimming off the leading zeros
But all the same readings are in post above here - i'll paste them back there.
1283  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 04, 2013, 07:46:37 am
Code:
Temp*C RH% -Preamble- BC CH Temperature- Humidity --CRC?--
                      BB CC LLLLMMMMHHHH LLLLHHHH
 7,1*C 93% 0001010111 01 01 001101000101 11010101 10011000
I still wonder if first 8/10 bits are random number used as device ID
BC looks like 2 bit battery condition
CH is channel number from switch position?
Have not figured out the CRC yet but that's what I assume it is.
1284  Using Arduino / Project Guidance / Re: Transport Control via RS232 on: February 04, 2013, 06:48:59 am
Quote
Step one seems simple, I should setup a pin as an output and write it low.
For step two should I wire Pin 8 directly to digital pin?  If so are there steps that I need to take to protect the arduino from getting fried?
Do not wire the CTS & RTS pins on the 9 pin D-sub connector directly to the arduino pins as this will probably knacker your arduino. The MAX232 board you have has a spare RX/TX pair so you could try and connect relevant wires onto these spare pins so the MAX232 does your TTL/RS232 level conversion needed for the RTS/CTS signals. Another option is to buy another TTL/RS232 converter that breaks out CTS/RTS like this http://www.ebay.co.uk/itm/MAX232-RS232-Serial-To-TTL-Output-Converter-Board-RXD-TXD-RTS-CTS-F-PIC-Atmel-/290712442058?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item43afcfd4ca
1285  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 04, 2013, 05:45:03 am
Quote
I also see about that you also used 'preamble' - do you know why would it change when changing batteries?
The transmitter will probably generate a random number when first powered on (or batteries changed) and this will become all/part of the preamble.
Code:
                        TX LLLL MMMM HHHH LLLLHHHH
Temp   RH% -Preamble- ??CH Temperature- Humidity
 7,1*C 93% 0001010111 0101 001101000101 11010101 10011000
Looks like temperature is transmitted as 12 bits in 3x nibbles ranging from low to high nibbles. A fixed offset of 900 is applied to the temperature value so 0 degrees F = 900 and each degree F change is 10 decimal. In the example 001101000101 becomes 010101000011 that is 1347 decimal.
1347-900 = 447
447/10 = 44.7
44.7F = 7.1C
1286  Topics / Home Automation and Networked Objects / Re: 433 MHz RF - Temperature and humidity sensor on: February 04, 2013, 04:16:24 am
Quote
What are those 'leading' zeroes?
You transmitter sends 42 bits but the subroutine to display the data as binary only does 32 chunks so 2x 32 bit chunks displays 64 bits with leading zero's instead of just 42 bits.

Code:
                        TX                LLLLHHHH
Temp   RH% -Preamble- ??CH                Humidity
 7,1*C 93% 0001010111 0101 0011 0100 0101 11010101 10011000
Humidity is stored as low/high order nibbles. In the example above take the first 4 bits and tack them on the end of the next 4 bits. 11010101 becomes 01011101 that is 93 decimal. Not done temperature yet but it look like it's also split into nibbles.
1287  Using Arduino / Networking, Protocols, and Devices / Re: How can i use Nunchuck with arduino micro on: February 03, 2013, 11:11:03 am
My research already bring me to your links, where only arduino Uno/Due is used, witch don't work for my micro.
No one have a Arduino micro and have working nunchuck ?
You communicate with the Nunchuck using SDA/SCL that are on pins D2/D3 respectfully on the Micro. Though I don't have a Micro I assume that following any UNO tutorial but substituting A4/A5 wiring for D2/D3 would work.
1288  Community / Website and Forum / Re: ***** SurferTim has been banned? ***** on: February 03, 2013, 05:17:28 am
Glad to see your back, any idea/explanation why or how this happened? Was it a glitch, account/site hacking, malware/virus or something else?
1289  Community / Exhibition / Gallery / Re: LED Steplight on: February 03, 2013, 05:12:23 am
Very nice and very neat. <sigh> if only I had stairs.
1290  Using Arduino / Networking, Protocols, and Devices / Re: How can i use Nunchuck with arduino micro on: February 03, 2013, 03:22:40 am
A quick Google search for "arduino nunchuck" brings up several hits. Maybe start with these http://www.instructables.com/id/Wii-Nunchuck-as-general-purpose-controller-via-Ard/?ALLSTEPS and http://www.gabrielbianconi.com/projects/arduinonunchuk/
Pages: 1 ... 84 85 [86] 87 88 ... 153