Problem with VGA and keyboard usage
Hi All
Im trying to make a modular relay control system. Basically I want a prop with a vga display and keyboard entry, the user will type in a 3 digit number and press enter, this toggles the state of that relay and displays what the state is now.
My idea was to use one prop for the display and keyboard, which then sends out a broadcast message to the relay control boards (SX48's) either via I2C or via serial, the corresponding sx48 boards toggles the relay.
My question is how can i do the vga and keyboard entry easily? i thought it would be best for the prop to maintain the registry of what relays are in which state so there is only 1 way traffic over the i2c bus/serial
Ive got no idea where to start
any help would be great
DJH
Im trying to make a modular relay control system. Basically I want a prop with a vga display and keyboard entry, the user will type in a 3 digit number and press enter, this toggles the state of that relay and displays what the state is now.
My idea was to use one prop for the display and keyboard, which then sends out a broadcast message to the relay control boards (SX48's) either via I2C or via serial, the corresponding sx48 boards toggles the relay.
My question is how can i do the vga and keyboard entry easily? i thought it would be best for the prop to maintain the registry of what relays are in which state so there is only 1 way traffic over the i2c bus/serial
Ive got no idea where to start
any help would be great
DJH
Comments
Graham
I have done just that, I have got the keyboard test object to use VGA, but I cannot figure out how to tell it where to right the text, but worse than that is the fact that it does not display the keystroke (just garbage), like if I press key 3 it displays an arrow :S
I want to be able to type in 3 numbers, press enter and have that stored as a variable.
PUB start | i
'start the tv terminal
text.start(16)
text.str(string("Keyboard Demo..."))
'start the keyboard
kb.start(26, 27)
'echo keystrokes in hex
repeat
'text.hex(kb.getkey,3)
keypressed := kb.getkey
text.str(keypressed)
Anyone help?
but it's come in handy on many occasions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
I had an error on that code on the key.key part, im guessing I need to add some stuff in var etc.
Anyway it kicked me into fixing part out it. I was using text.str( instead of text.out(
now it diplays whatever key is pressed [noparse]:)[/noparse]
now I need to figure out how to capture 3 keys into one variable,
basically there is going to be loads of outputs each with a 3 digit number, I want to be able to type the number press enter and toggle the respective output. ive been away from prop and programming in general so am struggling to slip back into it (not that I was ever that good at it anyway [noparse]:)[/noparse]
Thanks
DJH
???
I now have it so that you type in 3 numbers, press enter, it displays the 3 numbers and then resets.
I now need to add some sort of error control so that it only accepts numbers, any ideas?
is there a way to check if a string is numeric?
Need to sort out how to send serial comms then.
On the other end will be a load of SX48 boards that all sit waiting for serial input. If the number is in the range of the board it will activate that relay, otherwise it ignores it.