Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Jason

Pages: 1 2 3 4
Thumby / Re: Game Fast Executes and Emulates but won't play normally
« on: March 27, 2023, 10:45:21 AM »
Your game seems to work fine for me. I can save it to Thumby and run it from the main menu.

This probably means your game's main file is not in a folder with the same name. In the editor use File -> Set Path and make sure the path to your game is exactly: /Games/AsteroidsClone/

Thumby / Re: Game Fast Executes and Emulates but won't play normally
« on: March 24, 2023, 01:32:21 PM »
I'm having a bit of trouble with an asteroids clone I'm working on.  My game works perfectly on the emulator, and it works perfectly when saved to the Thumby and Fast Executed, but if is chosen from the Thumby menu on the device like starting any other game, the Thumby immediatley restarts.  I just can't figure it out.  I've tried reformatting the Thumby, updating, unpackaging a brand new Thumby... everything I can think of.  Memory allocation looks okay after loading everything on game start, and I cant get it to throw any errors while its connected to my PC.  Any ideas?  Anyone else dealt with the same problem?

Could you send or post the code? I can take a look and provide feedback.

You should be able to hold the sensor flat and still, record the number on the axis with the largest magnitude, and then divide each axis with that number after getting the readings. Now you'll have all the readings normalized to gravity, so just multiply the readings by 9.8 after dividing them.

The value I recorded was -261.0 on the z-axis, so I'll divide each axis by its magnitude and then multiply by 9.8
Code: [Select]
#include <Wire.h>
#include "BMA250.h"

BMA250 accel_sensor;
int x, y, z;

#if defined(ARDUINO_ARCH_SAMD)
 #define SerialMonitorInterface SerialUSB
 #define SerialMonitorInterface Serial

void setup() {

  SerialMonitorInterface.print("Initializing BMA...");
  // Set up the BMA250 acccelerometer sensor
  accel_sensor.begin(BMA250_range_2g, BMA250_update_time_64ms);

void loop() {;//This function gets new data from the acccelerometer

  // Get the acceleration values from the sensor and store them into global variables
  // (Makes reading the rest of the program easier)
  x = accel_sensor.X;
  y = accel_sensor.Y;
  z = accel_sensor.Z;

  if (x == -1 && y == -1 && z == -1) {
    SerialMonitorInterface.print("ERROR! NO BMA250 DETECTED!");
  else {


void showSerial() {
  SerialMonitorInterface.print("X = ");
  SerialMonitorInterface.print((x / 261.0f) * 9.8f);
  SerialMonitorInterface.print("  Y = ");
  SerialMonitorInterface.print((y / 261.0f) * 9.8f);
  SerialMonitorInterface.print("  Z = ");
  SerialMonitorInterface.println((z / 261.0f) * 9.8f);

You could simplify the conversion math by combining the constant values: 9.8/261.0 =  0.0375. Now I can convert each axis this way:
Code: [Select]
void showSerial() {
  SerialMonitorInterface.print("X = ");
  SerialMonitorInterface.print(x * 0.0375f);
  SerialMonitorInterface.print("  Y = ");
  SerialMonitorInterface.print(y * 0.0375f);
  SerialMonitorInterface.print("  Z = ");
  SerialMonitorInterface.println(z * 0.0375f);

Wirelings / Re: wireling Pi HAT config error
« on: March 03, 2023, 10:48:21 AM »
I'm using the AST1001 accelerometer and the wireling Pi HAT. The Raspberry Pi I'm using is the same as yours and I installed the newest version of the OS. I just use a new SD card and downloaded the newest OS in it and run this OS on Raspberry Pi 3 v1.2 board.

Could you try following the steps in this link?

What is the value of 'revision' in the output of the first command?
Code: [Select]
cat /proc/cpuinfo
For me it is a22082

Wirelings / Re: wireling Pi HAT config error
« on: February 28, 2023, 11:48:18 AM »
I was able to get that example working fine on my Raspberry Pi 3 Model B V1.2.

Can you provide the following?
  • Board name
  • Board version
  • OS name
  • OS version

Thumby / Re: Thumby Softlocked / Unresponsive
« on: February 17, 2023, 10:20:40 AM »
You can try manually updating it by following the directions here in the last bullet point under "Why is my Thumby not connecting to the Web Code Editor?"

To make it easier, follow the steps in the image attached to my comment. Here's the link for the firmware image from those steps:

Thumby / Re: screen just wont work after reformat
« on: October 17, 2022, 09:59:36 AM »
For anyone else reading this, we handled this on Discord.

If the UF2 reformatting didn't work then it must be some other problem.

Thumby / Re: Background art resources
« on: September 29, 2022, 12:54:43 PM »
@Jason - I appreciate the testing and review.

Currently assigning the bitmap to a Sprite class is commented out as default.  I figured this wasted RAM (/ program memory?) if the user chooses another blitting method or if the sprite is never used...?
Is that a fair assumption?
Might the API be extended in the future, with other blitting classes? (e.g. simple non-masked bitmap, or a screen pattern fill, etc.)

Commenting the sprite by default seems like a good idea. As you said, it would use ram.

The Thumby API is always open to being extended. I think a pattern fill function would be great!

Right now, the Thumby API lives here:

Thumby / Re: Background art resources
« on: September 29, 2022, 10:41:48 AM »
Thanks Jason.
I'm new to Python and Thumby... does the generated code look reasonable?
I'd like to refine it to 100%, before converting hundreds of images!  ;D

Yup, looks good enough.

I also tested it on Thumby and the emulator and it works. Importing the comment string into the bitmap builder is also functional.

Thumby / Re: Background art resources
« on: September 28, 2022, 06:11:50 PM »
This is really cool! Once you're in a good spot we should add a link to this in the documentation, or something like that.

You should link this in the Discord:

It looks like this is at least nearly a solved problem.  Could you post more specifics of what was done and what is and isn't working?  I would like to use tinyscreen+ and tinyzero with PlatformIO.


This was a year ago. Things may have changed since then.

Have you tried using a TinyScreen+ or TinyZero with PlatformIO? What errors are you getting?

Thumby / Re: Can't connect thumby to editor on Linux
« on: June 10, 2022, 12:44:34 PM »
Try adding your user to the dialout group:
Code: [Select]
sudo adduser $USER dialout
You may need to log out and back in or reboot afterwards

Thumby / Re: Thumby Code Editor Issues
« on: April 28, 2022, 04:13:57 PM »
I feel more and more that's it's an emulator issue, I keep listing my files every execution. Sometime a file is missing and just with code changes it reappears.

On the emulator page, there is a list of files, are all those file supposed to be accessible, because it seems to fit all my files that are set to emulate (the white checkmark). But not all of them are available when the emulator is started?

Anyone has any pointer for this issue? I'm thinking of migrating all my data to a python .py file so I don't have to fight this issue, but it just doesn't feel right

I agree that it sounds like an emulator issue.

I may have time to look at it soon.

Thumby / Re: Error while trying to send data through link cable
« on: April 26, 2022, 05:31:46 PM »
Correct. You can see where that prints here:

The max packet size can only be 512 bytes when using the built in link API

Thumby / Re: Thumby Code Editor Issues
« on: April 25, 2022, 10:12:15 AM »
These are issues that we are working on addressing. In the meantime,

  • Use Utilities -> Widgets -> + Editor (this should be a simple + icon in the future)
  • Make sure to check the white emulation box on the sprite data file and that it's path is where you expect (hover over the file tab)
  • Bitmap Builder and the sprite importer will likely be combined at some point
  • You can write to a file in the emulator but it will not be there the next time it starts. You can print to the shell from hardware or the emulator using print() (a standard Python function)

Pages: 1 2 3 4
SMF spam blocked by CleanTalk