Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 16:32 24 Apr 2024 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 : CMM2: Next steps?

     Page 8 of 8    
Author Message
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 367
Posted: 11:17am 04 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
If you have the odd 1000 hours free to code it - feel free

I would second this:  >>> Combined Numeric Operations, such as
+=, -=, or=, and=, /=, ++, --, etc  as a segue to Python-esqu syntax (sorry to drop the P bomb)

Discussed repeatedly - not Basic - not happening sorry


Fully appreciate it -- "if you don't ask you don't get"  


Radians / Degrees

Conscious of the saying "A horse designed by committee will look like a camel" ---- would it be possible to set the unit of measurement of angles (either degrees or radians)  -- from an education perspective, radians are only covered in post-16 maths, so using radians can be confusing for younger users.

Could this be an OPTION ANGLE  ??

Nim
Edited 2020-09-04 21:18 by Nimue
Entropy is not what it used to be
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 367
Posted: 11:28am 04 Sep 2020
Copy link to clipboard 
Print this post

  Geoffg said  Currently there is no way for a program to get the size of an array.  

On reflection, it would be difficult to come up with a logical syntax that could deal with multiple dimensions.  The manual recommends passing the size as additional parameter(s) to the sub/fun that will manipulate the array.  This might not be the neatest approach but it works and is used in other languages.

Geoff


Is ReDim an option to expand / contract arrays once declared?
Entropy is not what it used to be
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3650
Posted: 04:36pm 04 Sep 2020
Copy link to clipboard 
Print this post

Peter added BOUND to the CMM2.

John
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 382
Posted: 06:19pm 04 Sep 2020
Copy link to clipboard 
Print this post

People have already mentioned a mouse with firmware-level interrupt support for reading the X-Y location. I would be great to have something like this; the Nunchuk, IMHO, is a very poor substitute.

I would love to have a line continuation character so that we could have longer lines in MMBasic. This should not require any big changes in the language; most languages that support line continuations just use a tiny preprocessor that simply glues the multiple lines together into a single long string before feeding it to the parser.

-Bill
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 06:24pm 04 Sep 2020
Copy link to clipboard 
Print this post

  Quote  It is time to wind up this thread as V5.05.05 is complete as far as the main functionality I intend to include in the CMM2


Which bit of what I wrote was unclear? The CMM2 functionality is essentially complete other than tweaks. Mouse support and continuation lines are not tweaks
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3650
Posted: 06:53pm 04 Sep 2020
Copy link to clipboard 
Print this post

  William Leue said  People have already mentioned a mouse with firmware-level interrupt support for reading the X-Y location. I would be great to have something like this; the Nunchuk, IMHO, is a very poor substitute.

I would love to have a line continuation character so that we could have longer lines in MMBasic. This should not require any big changes in the language; most languages that support line continuations just use a tiny preprocessor that simply glues the multiple lines together into a single long string before feeding it to the parser.

-Bill

Remember you can request the source and add the things you want.

John
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 382
Posted: 05:53pm 05 Sep 2020
Copy link to clipboard 
Print this post

In fact, I have the source, but doing it just for me does not make a lot of sense. If the change is useful, it should be available for everyone.

-Bill
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3650
Posted: 03:59pm 06 Sep 2020
Copy link to clipboard 
Print this post

If it's a lot of work, and Peter is too busy or disinclined to do it but someone else does it, then it can be adopted and thus available as you say.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 04:19pm 06 Sep 2020
Copy link to clipboard 
Print this post

Continuation lines won't work and would break major parts of the MMBasic internals - don't bother trying.

Mouse support via USB is do-able but would be either/or with a keyboard. Mouse support via PS2 is also do-able but would need an I/F adapter and uses a defunct standard. It could be done in a CFunction but can't easily be added to the firmware as there are no command of function slots free
Edited 2020-09-07 02:24 by matherp
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5896
Posted: 08:54pm 06 Sep 2020
Copy link to clipboard 
Print this post

PS2 mouse is easy with an Arduino nano to convert PS2 to Nunchuk or serial.
I have a working unit which does both.
I will probably post the details later this week.

There are USB mouse to serial adapters around but I have not tried them.

USB mouse to Nunchuk should be doable But I have plenty of PS2 mice to keep me going for many years.

Using Nunchuk or serial interface makes interfacing to programs easy in Basic.

Jim
VK7JH
MMedit   MMBasic Help
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 10:43pm 06 Sep 2020
Copy link to clipboard 
Print this post

Jim, how are you encoding your mouse data to nunchuk format?

I've been tinkering with something similar.
My 'chukulator' emulates a nunchuk as far as the CMM2 is aware. A standard PC joystick (15 pin game port) appears as a nunchuk joy stick and buttons Z and C. I'm thinking of putting the mouse data into the 3 accelerometer channels. Ax for x, Ay for y and Az for the wheel. And set the highest bit when the corresponding button is pressed.
Visit Vegipete's *Mite Library for cool programs.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 11:13pm 06 Sep 2020
Copy link to clipboard 
Print this post

Would it be possible to have a way to programatically load fonts? Perhaps the LOAD FONT command could also accept an array containing the font data? Or better, because then more than one such loaded font would be possible:
DefineFont #N
 fontdataarray()
End DefineFont
where the array is dimmed as integer.

This would be useful for a program like FontTweak running directly on the CMM2, but would also allow programs to alter a font on the fly.
Visit Vegipete's *Mite Library for cool programs.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5896
Posted: 03:15am 07 Sep 2020
Copy link to clipboard 
Print this post

  vegipete said  Jim, how are you encoding your mouse data to nunchuk format?

I've been tinkering with something similar.
My 'chukulator' emulates a nunchuk as far as the CMM2 is aware. A standard PC joystick (15 pin game port) appears as a nunchuk joy stick and buttons Z and C. I'm thinking of putting the mouse data into the 3 accelerometer channels. Ax for x, Ay for y and Az for the wheel. And set the highest bit when the corresponding button is pressed.


Mouse XY mapped to Wii classic both left and right joysticks. I did both because I didn't know which was the preferred side.

I am doing a separate one for joysticks. Sticking with the classic for this one also.

The serial is sent out at the same time as the Wii is polled ~ 16mS
If there is no Wii polling, the serial is sent every 30mS

The serial is easier for the other Maximite devices to handle.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5896
Posted: 03:18am 07 Sep 2020
Copy link to clipboard 
Print this post

  vegipete said  Would it be possible to have a way to programatically load fonts? Perhaps the LOAD FONT command could also accept an array containing the font data? Or better, because then more than one such loaded font would be possible:
DefineFont #N
 fontdataarray()
End DefineFont
where the array is dimmed as integer.

This would be useful for a program like FontTweak running directly on the CMM2, but would also allow programs to alter a font on the fly.


You can LOAD FONT as often as you like, replacing font 8 on-the-fly.

Alternatively, you can use up to font 16 within the program.
Put them in  an include to save cluttering up the main program.

Jim
VK7JH
MMedit   MMBasic Help
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 377
Posted: 01:21am 08 Sep 2020
Copy link to clipboard 
Print this post

If you are using serial i/o and have (ed) problems with a usb keyboard, this mod  might be of interest. It is Geoff's terminal altered to use a usb keyboard.
Edited 2020-09-08 11:25 by zeitfest
 
     Page 8 of 8    
Print this page


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

© JAQ Software 2024