Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 08:55 20 May 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 : Arrows

Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 06:31am 14 Sep 2017
Copy link to clipboard 
Print this post

Has anyone got any fonts or code for making arrows?
I've tried using fonttweak but failed

What I need is an arrow pointing up and one pointing down
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1995
Posted: 06:40am 14 Sep 2017
Copy link to clipboard 
Print this post

http://www.rinkydinkelectronics.com/r_fonts.php

About 2/3rds down "Various Symbols"

you'll need to download the font you want and convert it using the tools in the "Embedded Fonts" folder in the micromite Firmware distribution.

hthEdited by CaptainBoing 2017-09-15
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 06:51am 14 Sep 2017
Copy link to clipboard 
Print this post

Thanks
I did see that but didn't know how to use it
I've downloaded the font I need and converted it to .bas
but how do I select the arrows?
or tell the micromite I want to use the arrow pointing down in font #8
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1995
Posted: 09:11am 14 Sep 2017
Copy link to clipboard 
Print this post

it's the character number; CHR$(x).

I am guessing they start from 32 which is <space> and go up to 127 (32+95). Where the character you need occurs in the sequence depends on the fontpack you chose.

Let's assume it's character 100, to use it, switch to the font you want and then use CHR$(100) on the panel.

See the section "Using an LCD Panel" in the micromite manual, tells you how to work with different fonts.

Edited by CaptainBoing 2017-09-15
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3167
Posted: 12:34pm 14 Sep 2017
Copy link to clipboard 
Print this post

The file "various_symbols.bas" in the Micromite zip file (under Embedded Fonts) is a conversion of the Rinky-Dink various symbols file and it has arrows plus a lot of other useful symbols.

Geoff
Geoff Graham - http://geoffg.net
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 08:54pm 14 Sep 2017
Copy link to clipboard 
Print this post

Thanks Geoff
I'm trying to figure out how to call the various fonts
I've tried every combination of the following but I can't get the arrow to display or any other symbol, it only draws numbers

PRINT FONT 8 chr$(80) which "should" be the arrow facing upwards

This just prints 0 8PEdited by lew247 2017-09-16
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 09:03pm 14 Sep 2017
Copy link to clipboard 
Print this post

You can't use fonts to print to the console, only GUIs

Look at the TEXT command
TEXT x, y, string$[,justification] [, font] [, scale][, c] [, bc]

You need something like:

Text 100,120,chr$(80),LT,8,1,rgb(red),rgb(black)

Jim
VK7JH
MMedit   MMBasic Help
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 09:46pm 14 Sep 2017
Copy link to clipboard 
Print this post

TassyJim you're a star

Last question can you assign a variable to a chr$ ?
for instance can I have something like the following or is there a better way to do it?

dim string ZA = chr$(79)
dim string ZB = chr$(80)

Text 100,120,ZA,LT,8,2,rgb(red),rgb(black)
Text 100,180,ZB(80),LT,8,2,rgb(red),rgb(black)

[quote] it doesn't work doing it this way but I'm probably making a stupid mistake[/quote]Edited by lew247 2017-09-16
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3167
Posted: 03:18am 15 Sep 2017
Copy link to clipboard 
Print this post

dim string ZB = chr$(80)
is fine but in your TEXT command you are trying to make ZB into an array with ZB(80)

The TEXT command should be:
Text 100,180,ZB,LT,8,2,rgb(red),rgb(black)

Geoff
Geoff Graham - http://geoffg.net
 
Print this page


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

© JAQ Software 2024