r8 One

The RPN calculator you program in Quadrate.

r8 One is an open-source pocket calculator with a keypad laid out for RPN, a memory LCD that needs no backlight, and a shell that runs the programs you type on it. The one on this page is running its real firmware.

leaves 42 on the stack

Press a sequence like this one to type it in, or click the calculator and use your keyboard. Esc clears the line and F1 to F5 are the keys under the screen.

Tap a sequence like this one to type it in, or tap the keys yourself.

Starting QDOS

Your stack and programs are kept in this browser, so they are still here when you come back.

A screen that keeps its picture

The display is a 2.7-inch Sharp memory LCD, 400 by 240 pixels, each one either ink or paper. It reflects the light around it instead of making its own, and it holds its picture with no power at all, so a calculator left on its stack costs next to nothing to keep showing it.

One bit per pixel is the whole colour budget. Everything the calculator draws is designed for it, from the stack to the graphs.

Two ways to type

The calculator is RPN: digits build a number, Enter pushes it, and an operator works at once. Undo takes back the last key, and Esc never touches the stack.

A line takes whole Quadrate, with definitions, loops and strings. Define a word in one and it works on the stack like any key.

leaves 49

Write a program, then run it

On the r8 One you type these on the keypad. Here, Run types them in for you, fast enough to watch, and leaves you on the result. Esc on the calculator comes back out.

Fibonacci, in a loop

A word with a stack signature, a counted loop, and two locals named with -> each time round.

fn fib(n:i64 -- r:i64) {
	0 1 rot             // the first two, under n
	0 swap 1 for i {
		-> b -> a       // name the pair
		b a b +         // and step it along
	}
	drop
}

30 fib
leaves 832040

A curve from straight lines

Forty-two lines between the edges of the screen, and a parabola appears in each corner where they cross.

fn art( -- ) {
	ui::cls
	0 21 1 for i {
		0 i 12 *  i 20 * 239  ui::line
		399 239 i 12 * -  399 i 20 * - 0  ui::line
	}
	ui::show
	loop {
		30 ui::frame drop
		ui::pressed "" != if { return }   // any key leaves
	}
}

art
any key leaves

A ball that bounces

Two words: one turns the ball back at a wall, the other draws it frame after frame, asking ui::frame for sixty a second.

// The speed, turned back at either wall
fn wall(p:d128 v:d128 hi:d128 -- r:d128) {
	rot dup 10.0 < if { drop drop abs return }
	< if { abs neg return }
}

fn bounce( -- ) {
	200.0 -> x  120.0 -> y
	3.0 -> dx   2.0 -> dy
	loop {
		60 ui::frame drop
		ui::pressed "" != if { return }
		x dx + -> x  y dy + -> y
		x dx 390.0 wall -> dx
		y dy 230.0 wall -> dy
		ui::cls
		x y 10.0 1 ui::circle
		ui::show
	}
}

bounce
any key leaves

Any word can be graphed

A word that takes x and leaves y is a function to plot. On the graph, TRACE follows the curve and CALC finds its zeros, extremes and areas.

fn f(x:d128 -- y:d128) { dup sin * }

-12.0 12.0 -12.0 12.0 ui::window
"f" ui::plot
Esc leaves the graph

And turned in three dimensions

Take x and y, leave z, and graph3 draws the surface as a wireframe. The arrows turn and tilt it, and + and − zoom.

fn g(x:d128 y:d128 -- z:d128) {
	dup * swap dup * + sqrt sin 4.0 *   // a ripple
}

"g" graph3
Esc leaves

A word made at the prompt lasts until the calculator is switched off. To keep one, open APPS, press NEW and write it in the editor.

The functions you reach for

  • Scientific. Trigonometry, logarithms and powers, with each inverse on shift. Whole quarter turns are exact, so the sine of 180 degrees is 0.
  • Complex numbers, made from two reals with one key and shown as a+bi or in polar form.
  • Statistics. Six lists, one- and two-variable statistics, and linear, quadratic, exponential, power and log regressions.
  • Graphs. Plot functions and lists, or draw a surface as a wireframe you turn with the arrow keys.
makes 3+4i

Apps on the card

These come with it, each a Quadrate program you can open and read.

clock
A stopwatch and a countdown timer, in large figures.
fin
Loan payments from any three of amount, rate, years and monthly payment.
mandel
The Mandelbrot set. Move with the arrows, zoom with + and −.
quad
Roots, vertex and graph of ax² + bx + c.
spring
A damped spring in real time, its height traced against time.
sudoku
Sudoku on the number keys, saved as you go.
triangle
Solve a triangle from any three of its parts.
units
A value in one unit, shown in every other unit of its kind.
opens the list

An app is a folder with a main.qd in it. Plug the calculator into a computer and it shows up as a drive: drop the folder on it, and the app is there when you unplug.

Inside

DisplaySharp LS027B7DH01 memory LCD, 2.7 inches, 400 × 240, reflective
Keypad54 keys in 10 rows, with an Alpha face for letters and a Symbol face for Quadrate
ComputerRaspberry Pi Zero W: 1 GHz ARM11, 512 MB. The firmware also runs on an ESP32-S3.
StoragemicroSD card
USBOne port. A keyboard plugs into it, and a computer sees the calculator as a drive.
Size98.5 × 214.1 × 32 mm
SoftwareQDOS, free software under the GNU GPL

Where it stands

In development. The parts are chosen and the software runs: what you are typing on is QDOS itself, compiled for the browser. No r8 One has been built yet, so there is nothing to order.

Everything is open, from the firmware to the case. Follow along, or build one with us.