Interface with Java

sub-bg

New Member
I've written a java program to interface with my picaxe 28x1 chip

a small part of the code I have in java is as follows:


----------------------------------------------------------------------------

if(e.getSource() == directN) //N is a button for the North direction
{
direction = 1111; // the direction has been declared as an integer
System.out.println(direction);
}

------------------------------------------------------------------------

how do i get my picaxe progam to read this and understand his direction ????
 

hippy

Ex-Staff (retired)
Assuming System.out.println adds a terminating 'end of line' character to what it sends out, the following should work ....

SerIn pin,baud,#w0

This should hopefully put the value 1111 into w0.

Getting the PICAXE to understand what that received value means is a matter of writing your program to look at the received value and responding appropriately.
 
Top