Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:29 05 Jul 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 : Introducing the Pi-cromite: first steps

     Page 9 of 16    
Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 10:52am 04 May 2017
Copy link to clipboard 
Print this post

With my program containing SYSTEM "date" as the first line (and leaving the Command Prompt in the last cursor position used by the executed program when Ctrl-C is pressed) I am seeing all kinds of strange behaviour.

If I type list, then the wording 'List' disappears and/or the first line of code is displayed incorrectly.
Typing NEW I then get a 'File not found' error.

IF when I exit my program with Ctrl-C AND then I press Ctrl-C again (to position command prompt at the start-of-line) then all seems ok.

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 11:13am 04 May 2017
Copy link to clipboard 
Print this post

  Quote  Where must it be located?


Same directory as mmbasic

  Quote  However, I have no back-space (i.e. delete to left of cursor) capability


Try doing the apt-get and see if it changes - works for me.
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 265
Posted: 11:21am 04 May 2017
Copy link to clipboard 
Print this post

When I type

sudo apt-get install pigpiod

from the terminal on the RasPi, it searches but does not find pigpiod.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 11:26am 04 May 2017
Copy link to clipboard 
Print this post

  matherp said  Try doing the apt-get and see if it changes - works for me.


No change here.

The 'back-space' key does nothing visually, however, if pressed mid-way through typing a command such as FILES, then when I press Enter, I get the file not found message named as the characters pressed up to the point where BackSpace was pressed.

Also, the Delete key (i.e. delete to right of cursor) displays the letter J.

Could this be a Nano setting that needs altering? I have only changed my background colour and font size (to be visually more pleasing)

WW
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 11:27am 04 May 2017
Copy link to clipboard 
Print this post

  cdeagle said   When I type

sudo apt-get install pigpiod

from the terminal on the RasPi, it searches but does not find pigpiod.


PIGPIO (no 'd' on the end)
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 11:39am 04 May 2017
Copy link to clipboard 
Print this post

Peter,

The BackSpace (and Delete key) issues only occur at the command prompt. In the EDITor they both work as expected.

I am on a 'standalone' setup (i.e. USB keyboard & HDMI monitor)
Have performed the apt-get AND done a reboot just to be sure.

WW
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 265
Posted: 11:44am 04 May 2017
Copy link to clipboard 
Print this post

Thanks Peter. That worked for PIGPIO.

I'm seeing the same key behavior as WW.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 10:29pm 04 May 2017
Copy link to clipboard 
Print this post

  Quote  I am on a 'standalone' setup (i.e. USB keyboard & HDMI monitor)


That explains the difference. I'm doing all the development headless using teraterm over SSH. It will be next week before I can test with a monitor but I want to stick with the new console code because it should enable me to implement Geoff's colour editor

Attached is 5.3.a18, removed a diagnostic wait loop I left in in 17 which was killing performance

2017-05-05_082859_mmbasic.zip



 
centrex

Guru

Joined: 13/11/2011
Location: Australia
Posts: 320
Posted: 12:46pm 05 May 2017
Copy link to clipboard 
Print this post

I was going to ask for a blow by blow way of getting mmbasic to work on Pi but much reading of all the post's and a bit trial and error it all works.
Printed "Hullo World" 5 times on the screen.
Thank you Matherp & Geofg and all the posters.
Regards
Cliff
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 10:14pm 05 May 2017
Copy link to clipboard 
Print this post

Please find attached 5.3.a19

2017-05-06_092413_mmbasic.zip

This fixes the bug in delete from a18

AND it includes the Micromite full screen editor



Use OPTION COLOURCODE ON to enable colour editing

and then use the EDIT command as in the Micromite

If required you can still use nano using the command NANO


NB: the editing works well using putty over SSH. There is a problem with Delete /backspace in Teraterm. This can be fixed using OPTION TERATERM ON.

I haven't tested using a console window on a directly connected monitor/keyboard. Feedback appreciated.





Edited by matherp 2017-05-07
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 265
Posted: 12:12am 06 May 2017
Copy link to clipboard 
Print this post

The back space and delete are now working.

I'm getting pigpio "stuff" within the output from a program as seen here.

kepler3 solution
---------------- 2017-05-06 06:04:43 gpioGetMode: pigpio uni
eccentricity = 0.90000000017-05-06 06:04:43 gpioSetMode: pigpio unini
mean anomaly = 45.00000000 degrees

eccentric anomaly = 96.25884250 degrees

true anomaly = 156.76042886 degrees

iterations = 2

solution error = 0.0000000000

When I type run for the first time, MMBASIC responds with run.bas not found. If I type run a second time, the program in memory runs fine.

I'm currently using a RasPi 3 with the 7" official display and a Logitech Bluetooth keyboard.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 12:47am 06 May 2017
Copy link to clipboard 
Print this post

  Quote  I'm getting pigpio "stuff" within the output from a program as seen here.

I suspect the display is using some of the ports used by pigpio possibly SPI for touch. Do you get this problem if running with a normal hdmi monitor? If you can find any docs on the connections for the display please post a link.

  Quote  When I type run for the first time, MMBASIC responds with run.bas not found. If I type run a second time, the program in memory runs fine.


What is the exact sequence of commands before this? If I "load" a program and type run, or "auto" a program I'm not seeing this.

What options are set?

Have you tried EDIT on the display?


Edited by matherp 2017-05-07
 
sc05027
Newbie

Joined: 01/01/2015
Location: Hong Kong
Posts: 10
Posted: 01:11am 06 May 2017
Copy link to clipboard 
Print this post

I ran it on a directly connected HDMI monitor. F1 to F4 were not working in editing mode.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 01:26am 06 May 2017
Copy link to clipboard 
Print this post

  Quote  I ran it on a directly connected HDMI monitor. F1 to F4 were not working in editing mode.


Thanks for the feedback. This means the console isn't sending the same escape sequences for F1 to F4 as putty or teraterm over SSH

If you could do a test for me send me a PM with your email address and I'll send a version with some diagnostic code in it that should help me to fix it. Otherwise it will have to wait til next week.

Also please try the following:

ctrl-Q = F1
ctrl-W = F2
ctrl-R = F3
ctrl-G = SHIFT_F3
ctrl-T = F4
Edited by matherp 2017-05-07
 
sc05027
Newbie

Joined: 01/01/2015
Location: Hong Kong
Posts: 10
Posted: 01:51am 06 May 2017
Copy link to clipboard 
Print this post

ctrl-q,w,r,g,t work
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 01:55am 06 May 2017
Copy link to clipboard 
Print this post

  Quote  ctrl-q,w,r,g,t work


Great, thanks for confirming: From the Micromite manual...

[quote]You can also use control keys instead of the functions keys listed above. These control keystrokes are:
LEFT Ctrl-S RIGHT Ctrl-D UP Ctrl-E DOWN Ctrl-X
HOME Ctrl-U END Ctrl-K PageUp Ctrl-P PageDn Ctrl-L
DEL Ctrl-] INSERT Ctrl-N F1 Ctrl-Q F2 Ctrl-W
F3 Ctrl-R ShiftF3 Ctrl-G F4 Ctrl-T F5 Ctrl-Y[/quote]

All of these should work as per the Micromite for a keyboard that doesn't have function keys
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4034
Posted: 02:11am 06 May 2017
Copy link to clipboard 
Print this post

If the console is a Linux one, Fn keys are often set to do things already and would not reach a typical program.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 02:20am 06 May 2017
Copy link to clipboard 
Print this post

  Quote  Fn keys are often set to do things already and would not reach a typical program.


I'm using the ncurses library in raw mode so it intercepts everything before LINUX. That was the only way I could find to get rid of buffering of stdin so that functions like inkey$ and the editor could be implemented.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 02:42am 06 May 2017
Copy link to clipboard 
Print this post

Many thanks to sc05027 for doing some testing for me

Attached 5.3.a20

2017-05-06_124037_mmbasic.zip

The editor now runs properly on a local LINUX console process running on a directly connected HDMI monitor with normal support for the editor function keys
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 265
Posted: 03:54am 06 May 2017
Copy link to clipboard 
Print this post

Version 5.3.a20 seems to work fine on an HDMI display and the 7" LCD display.

Thanks to Peter and others helping to debug.

Here's a link to info about the 7" display.

https://www.raspberrypi.org/products/raspberry-pi-touch-display/
 
     Page 9 of 16    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025