Skip to content

v0.0.4 Arduino mode

Choose a tag to compare

@JupiterPi JupiterPi released this 12 Nov 19:35
· 1 commit to main since this release

New major feature: Arduino mode

With Arduino mode, available for Java/simple projects, you can code almost like with traditional microprocessors such as the Arduino. Instead of the tick() method, which is called every tick, you can now define a loop() method that is called continously and has access to the delay() method.

Example:

Before:

int ticks = 0;

void tick() {
  ticks++;
  if (ticks % 40 == 0) writePin(1, HIGH);
  if (ticks % 40 == 20) writePin(1, LOW);
}

New:

void setup() {
  pinMode(1, OUTPUT);
}

void loop() {
  writePin(1, HIGH);
  delay(20);
  writePin(1, LOW);
  delay(20);
}

Other features and fixes

This release contains some minor features:

  • You can now read logs from multiple computers. Right-click them with the logger tool to open. Use the logger tool anywhere else to close logs.
  • Cranberri runtime errors are now formatted more nicely.

And minor bug fixes:

  • It's now possible to have computers with no pins at all.