Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:01 08 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite TTY console, positioning the curser?

Author Message
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5128
Posted: 06:28am 04 Sep 2025
Copy link to clipboard 
Print this post

Hiya

I've discovered the joy of use a Pico W and the TTY terminal over wifi for developing code on a PicoMite. This is for a rover parked in the yard and I can work on the code from my office, while looking out the window to see what the rover does when I run it.

I send a lot of debugging data to the terminal with the PRINT command, and it scrolls down the screen.

Stupid question, is there a way to send control characters to the terminal so I can clear the screen and position the curser?

And, does this work with the terminal in MMEdit?

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1021
Posted: 07:20am 04 Sep 2025
Copy link to clipboard 
Print this post

Hi Glenn,
If you are using recent versions of MMEdit (last couple of years) then you would also be using MMCC as the terminal. MMCC allows you to connect to it using Teraterm (Mode--> VT Helper). Teraterm connects to localhost:50900 /telnet

Teraterm responds to most VT100 escape sequences. FotS has links to a number of libraries people have put together for the escape sequences.

VT100 escape sequences

You can setup your VT100 session so the top section of the terminal can be used to display various data at specific locations and create a scrolling window in the lower section. e.g. You could extract speed /direction from the incoming messages and display at top, while the actual messages display in the bottom half of the window and scroll off as new messages come in.

Some Picomite commands you could look at.
Pressing F5 on the terminal should clear the screen.
PRINT @(x [, y]) expression will print at a location
Print @(10,10) "Hello "

The libraries on FotS show examples of clearing screen etc.

Gerry
F4 H7FotSF4xGT
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6300
Posted: 07:20am 04 Sep 2025
Copy link to clipboard 
Print this post

Cursor Control

Cursor Home <ESC>[{ROW};{COLUMN}H

   Sets the cursor position where subsequent text will begin. If no row/column parameters are provided (ie. <ESC>[H), the cursor will move to the home position, at the upper left of the screen.

Cursor Up <ESC>[{COUNT}A

   Moves the cursor up by COUNT rows; the default count is 1.

Cursor Down <ESC>[{COUNT}B

   Moves the cursor down by COUNT rows; the default count is 1.

Cursor Forward <ESC>[{COUNT}C

   Moves the cursor forward by COUNT columns; the default count is 1.

Cursor Backward <ESC>[{COUNT}D

   Moves the cursor backward by COUNT columns; the default count is 1.

Force Cursor Position <ESC>[{ROW};{COLUMN}f

   Identical to Cursor Home.


Erasing Text

Erase End of Line <ESC>[K

   Erases from the current cursor position to the end of the current line.

Erase Start of Line <ESC>[1K

   Erases from the current cursor position to the start of the current line.

Erase Line <ESC>[2K

   Erases the entire current line.

Erase Down <ESC>[J

   Erases the screen from the current line down to the bottom of the screen.

Erase Up <ESC>[1J

   Erases the screen from the current line up to the top of the screen.

Erase Screen <ESC>[2J

   Erases the screen with the background colour and moves the cursor to home.


Hows that for a start.

MMEdit knows about most of the positioning codes but not the scrolling codes.

Jim
VK7JH
MMedit
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5128
Posted: 08:04am 04 Sep 2025
Copy link to clipboard 
Print this post

Thanks guys, that got me sorted.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025