Interfacing with Minicom

From Pinguino-Wiki
Jump to: navigation, search

Contents

Install

On GNU/Linux, a famous terminal emulator is called Minicom. Install it using your package manager.

Example code on pinguino

You can use this code as a test.

void setup()
{
}
 
void loop()
{
	CDC.print("Start\r\n",7);
 
	delay(5000);	// Wait 5 sec. to connect terminal emulator on new serial port
 
	CDC.print("Welcome on pinguino\r\n",21);
 
	for(;;) {
		delay(2000);
		CDC.print("running...\r\n",12);
	}
}

On your computer

When your Pinguino start running, a new device called /dev/ttyACM0 is created. You have to be in the dialout group to use it.

Launch the following command:

minicom -o -D /dev/ttyACM0

You will get the following:

Welcome on pinguino
running...
running...
running...
running...
running...

Use Ctrl-A Q to exit.

More

You can send keys from Minicom and read it using CDC.read

Personal tools