Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:01 26 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 : pointless picomite/ILI9341 demo: autumn in canada

     Page 2 of 2    
Author Message
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 10:20am 26 Nov 2021
Copy link to clipboard 
Print this post

  PeteCotton said  
Yeah - I don't get his/her line of thought.


sometimes, the irrational snobberies in tech (language/CPU/Bits etc...) makes me feel like



 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3655
Posted: 03:42pm 26 Nov 2021
Copy link to clipboard 
Print this post

  scruss said  
  JohnS said  What did you try that didn't?


Just tried "mmbasic code" on google.ca.

Top hit: https://circuitgizmos.com/projects/microboard-micromite-projects/mmbasic-code-library/

Click on any of the examples: There has been a critical error on this website
Okay.

Second: https://mmbasic.com/ - it's a description site with links to where you can download the interpreter. Examples? None.

Third hit is Geoff's site.

Pretty much everything below that is spam. Something I wrote on my blog that basically says "MMBasic is available on the Raspberry Pi Pico" (so no real content) appears just below cmm2.fun

I don't want the source code to MMBasic, I want to see and show off what it can do.

That shows how google returns very different results for the same search by different people.

Apparently it thinks it knows what you want but is wrong.

John
Edited 2021-11-27 01:42 by JohnS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3013
Posted: 03:58pm 26 Nov 2021
Copy link to clipboard 
Print this post

  scruss said  It would be nice if there were an archive/demo showcase of MMBasic code somewhere.


I have to admit that I never followed this link before, but in the "Microcontroller and PC projects" section of thebackshed, under "Sticky Topics", after clicking "Micromite MMBasic Library(s)", the second link, "Community driven MMBasic wiki", takes you to fruitoftheshed, "_MMBasic Code Library" section. Clicking "All Pages" gives many entries.

The second post there (just created) also has links.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
scruss
Regular Member

Joined: 20/09/2021
Location: Canada
Posts: 83
Posted: 05:34pm 17 Jan 2023
Copy link to clipboard 
Print this post

  scruss said  Source is here: Autumn in Canada: PicoMite version.


It was trivially easy to port to PicoMite VGA. The only part that required some thought was adapting it to the latter machine's limited palette.


' autumn in canada
' scruss, 2023-01 - PicoMite VGA
' a take on my https://openprocessing.org/sketch/995420 for picomite

OPTION base 1
' randomize Timer
' *** initialize polar coords of leaf polygon and colour array
DIM leaf_rad(24), leaf_ang(24), px%(24), py%(24)
FOR i=1 TO 24
 READ leaf_rad(i)
NEXT i
FOR i=1 TO 24
 READ x
 leaf_ang(i)=RAD(x)
NEXT i

DIM integer c%(4)
FOR i=1 TO 4
 READ r%, g%, b%
 c%(i)=RGB(r%,g%,b%)
NEXT i

' *** set up some limits
min_scale%=INT(MIN(MM.HRES, MM.VRES)/8)
max_scale%=INT(MIN(MM.HRES, MM.VRES)/6)
min_angle=-30
max_angle=30
min_x%=min_scale%
min_y%=min_x%
max_x%=MM.HRES - min_x%
max_y%=MM.VRES - min_y%

CLS
TEXT MM.HRES/2, INT(MM.VRES/3), "autumn in canada", "cm"
TEXT MM.HRES/2, INT(MM.VRES/2), "scruss, 2023-01", "cm"
TEXT MM.HRES/2, INT(2*MM.VRES/3), "just watch ...", "cm"

kt%=0
DO
 cx% = min_x% + INT(RND * (max_x% - min_x%))
 cy% = min_y% + INT(RND * (max_y% - min_y%))
 angle = min_angle + RND * (max_angle - min_angle)
 sc% = min_scale% + INT(RND * (max_scale% - min_scale%))
 col% = 1 + INT(RND * 3)
 leaf cx%, cy%, sc%, angle, c%(4), c%(col%)
 kt% = kt% + 1
LOOP UNTIL kt% >= 1024

END

SUB leaf x%, y%, scale%, angle, outline%, fill%
 FOR i=1 TO 24
   px%(i) = INT(x% + scale% * leaf_rad(i) * COS(RAD(angle)+leaf_ang(i)))
   py%(i) = INT(y% - scale% * leaf_rad(i) * SIN(RAD(angle)+leaf_ang(i)))
 NEXT i
 POLYGON 24, px%(), py%(), outline%, fill%
END SUB

' radii
DATA 0.536, 0.744, 0.608, 0.850, 0.719
DATA 0.836, 0.565, 0.589, 0.211, 0.660, 0.515
DATA 0.801, 0.515, 0.660, 0.211, 0.589, 0.565
DATA 0.836, 0.719, 0.850, 0.608, 0.744, 0.536, 1.000
' angles
DATA 270.000, 307.249, 312.110, 353.267, 356.540
DATA 16.530, 18.774, 33.215, 3.497, 60.659, 72.514
DATA 90.000, 107.486, 119.341, 176.503, 146.785, 161.226
DATA 163.470, 183.460, 186.733, 227.890, 232.751, 270.000, 270.000
' leaf colours
DATA 255,0,0, 255,85,0, 255,170,0, 255,255,0


(and now I discover that the SD card on my PicoMite VGA doesn't seem to work, so there was a lot of copying, pasting and editing to get this text here.)
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 892
Posted: 07:33pm 17 Jan 2023
Copy link to clipboard 
Print this post


'no comment
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024