Ok, so i have spent an afternoon trying to work this out and I am sure I have overlooked something really obvious....but can't see it.
So I have set up tx and rx as said in the Pi wiki.
Then I wrote this python script:
and picaxe has :
the hardware is a straight connection with the pi with series resistor and everything running on the pi 3.3v supply.
In the terminal window in the picaxe basic program, accessing straight from the picaxe download cable, all i get is 250 printed every 3 seconds....
As i said, I am missing something really obvious as I was expecting to have 9 and 5 printed alternately.
So I have set up tx and rx as said in the Pi wiki.
Then I wrote this python script:
Code:
import serial
import time
port = serial.Serial("/dev/ttyAMA0", baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=3.0)
while True:
port.write('9')
time.sleep(3)
port.write('5')
time.sleep(3)
Code:
#Picaxe 08M2
Do
SerIn c.2, T9600_8, b0
SerTxd( #b0, " " )
Loop
In the terminal window in the picaxe basic program, accessing straight from the picaxe download cable, all i get is 250 printed every 3 seconds....
As i said, I am missing something really obvious as I was expecting to have 9 and 5 printed alternately.