I was visualising something like below; coil and drive not shown. All three relay contacts go to PICAXE ADC pins -
.|. .|. .|. Relay
|_| |_| |_| .-------.
| | | .--|--O |
<>--^-.-|---|-----(O--' | \O--|--...
For a comprehensive test, I would probably connect all three contacts ( Common, N/O, N/C ) to ADC pins with a pull-up and pull-down. Then you can put out a digital high and low to each of those and measure the voltage on the others, for High -
Excellent news. Glad it worked and thanks for letting us know.
With 'single function' devices they are often pre-configured and power-up 'ready to use' so it's just a matter of setting output data or reading input data. For devices which are more 'multi-function', can be configured in different...
That should be relatively easy and you can probably just use the Ph word value.
The challenge is going to be in determining what Ph values you can expect, what tone you should generate depending on the difference. That's probably going to require some experimentation.
This would be my first atte,pt -
Symbol MODE1 = $00
Symbol MODE2 = $01
Symbol LED0 = $02
Symbol LED1 = $03
Symbol LED2 = $04
Symbol LED3 = $05
Symbol GRPPWM = $06
Symbol GRPFREQ = $07
Symbol LEDOUT = $08
HI2cSetup I2CMASTER, %11000000, I2CSLOW...
The PROM holds configuration constants, not the actual sensor data. CMD_PROM_7 reads the CRC for the configuration which my code doesn't use so I did not bother reading it.
That is entirely separate from reading the raw pressure data.
The pressure reading is three bytes, not four, which...
Perhaps post your full code. This works for me when I test it in the simulator -
symbol X1 = b0
symbol X10 = b1
symbol X100 = b2
symbol K = b3
symbol K10 = b4
symbol K100 = b5
symbol M = b6
symbol M10 = b7
symbol M100 = b8
symbol G = b9
symbol G10 = b10
symbol MHz = b11
You don't want those # symbols there if receiving ASCII digits into each. and you will have to subtract "0" or $30 to get those ASCII characters to be numeric 0-9 after reception.
"FA" and "F","A" are interpreted the same way, so it doesn't matter how you specify them.
Try a simple Proof of...
HI2cIn ( Ph.msb, Ph.lsb, Pl.msb ) : Pl.lsb = 0
sertxd(#b18," ",#b19," ",#w9," ",#b20,lf,cr)
I think you have confused yourself by including #w9. I would remove that or, more preferable, just use -
I am not familiar with that chip and couldn't find anything on the forum but there's a datasheet here -
It might be worth letting us know which size chip you are using so the Device Address can be figured out, and a link to the product if you...
Will the serial terminal in the Editor read an input device?
Not sure exactly how you mean but a PICAXE program can take input from the Terminal window, input state can be reported to the Terminal.
Is poke 56 like a street address or perhaps an intersection in the chip?
It's like a house...
It would seem to be. The connector you are looking at in your photo has 11 connections, but as two are 3.5V that's really 10. A standard Playstation connector appears to have 9 connections, one of which is not used. There seems to be a good correlation if we take it that BL and BD is only for a...
I am not familiar with the Playstation 2 or its controllers but I would guess -
DI, DO, CLK and CS is an SPI connection for the Playstation
BL and BD might be the clock and data connection for a PC
That leaves ACK which I have no idea about but, if a signal from the controller, you might be...
;segment data for TM1637
;( 0 1 2 3 4 5 6 7 8 9 A b C d E F dash blank)
DATA 0,($3f,$06,$5b,$4f,$66,$6d,$7d,$07,$7f,$6f,$77,$7c,$39,$5e,$79,$71, $40, $00)
symbol dio = C.1 ;TM1637 data pin...
You could use -
bit1 = pinC.1
or something similar. If you end up having bit0 through bit7 representing pinC.0 through C.7 you can do that in one hit -
b0 = pinsC
Individual bit assignments are convenient when the inputs come form all over the place, from non-consecutive pins. Bulk 'pins'...
The bits in 'b0' are 'bit0' through 'bit7' and the bits in 'b1' are 'bit8' through 'bit15'
So "If bit0 = 1" tests the lsb of 'b0' and "If bit8 = 1" tests the lsb of 'b1'.
If you prefer using that style you can do something like it, such as this -
Symbol b0.bit0 = bit0
Symbol b0.bit1 = bit1...
There are a fair few projects and discussions on the forum for driving single RGB LEDs which is probably the best way to start, including -
Using a single 4-leg RGB LED, common cathode or common anode, and even with just one resistor...
You can use "PULSOUT <pin>, <N>" to generate a pulse where 'N' is in 10us units at 4MHz operating speed.
So for a pot reading of 0 to 255 you want N to be 0 to 3000, because 3000 x 10us = 30000us, 30ms.
In a perfect world -
ReadAdc <adcPin>, b0
w1 = b0 * 3000 / 255
PulsOut <pin>, w1