User input into Serial Terminal?

bz26

New Member
Is there a way to have the Picaxe Editor read user input in the Serial Terminal like Arduino does? I'm looking to create a program that will take an integer the user types into the Serial Terminal and uses that value to control the flash rate of an LED connected to a digital pin on my PicAxe-28 board. The board would have to be plugged into the computer for this to work. I have gone through several searches, but have yet to find anything.

Here's part of my code:

Code:
;communicate with computer, try to get user input in the Serial Terminal 
hsersetup B9600_8, %10
sertxd("System initialized.")
This opens the Terminal and prints "System initialized." But how do I call for input from the user?
 

westaust55

Moderator
Welcome to the PICAXE forum.

You can use the SERRXD command for the PICAXE to receive data through the SerialIn pin from the Programming Editor Terminal Screen (Accessed with the embedded #TERMINAL directive on download or using F8 button).

You will need to ensure that you match the format of the data between the PE Termainsl window and the PICAXE and include a non-printing/non numeric character (ie use the< return> key) to flag to the PICAXE that the input is complete.
 
Top