Recent Posts

1
Wirelings / Re: Accelerometer: transfer the raw data to the real acceleration in m/^2
« Last post by Jason on March 14, 2023, 11:12:03 AM »
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
#else
 #define SerialMonitorInterface Serial
#endif


void setup() {
  SerialMonitorInterface.begin(115200);
  Wire.begin();

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


void loop() {
  accel_sensor.read();//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 {
    showSerial();
  }

  delay(250);
}


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);
}
2
Wirelings / Accelerometer: transfer the raw data to the real acceleration in m/^2
« Last post by Leeyt4541 on March 13, 2023, 05:18:50 PM »
Hey Sir/Madam,

I have a simple question: what is the unit of acceleration in three axes and how can I transfer this value to the actual acceleration in m/s^2? I tried to figure it out but failed. I think transferring the raw data to the actual acceleration needs a scaling factor (like accelerometer ADXL345) but I don't know this specific factor for BMA250. Hope someone can help me figure it out.

Thanks!
3
TinyTV & Tiny Video Player / Re: JST Power
« Last post by Klamsy79 on March 09, 2023, 02:58:50 AM »
Thanks for the quick and detailed answer. I can work with that.
Best regards
Christian
4
TinyTV & Tiny Video Player / Re: JST Power
« Last post by lennevia on March 08, 2023, 02:11:58 PM »
Yes, just make sure you're not supplying too much voltage. Most of our products are rated 3-5V. You can also power the TV using the Micro USB connector on the top of the screen board/housing.

We have the correct JST connectors stocked here: https://tinycircuits.com/products/jst-sh-2-pin-connector

Cheers,
Réna
5
TinyTV & Tiny Video Player / JST Power
« Last post by Klamsy79 on March 08, 2023, 08:58:42 AM »
Hello
Is it possible to connect another voltage source to the Jst socket. For example a power bank?
6
Wirelings / Re: wireling Pi HAT config error
« Last post by Jason 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? https://stackoverflow.com/a/74147334

What is the value of 'revision' in the output of the first command?
Code: [Select]
cat /proc/cpuinfo
For me it is a22082
7
Wirelings / Re: wireling Pi HAT config error
« Last post by Leeyt4541 on March 03, 2023, 08:21:14 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

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.
8
Thumby / Re: Thumby unresponsive
« Last post by Binabiqe on March 02, 2023, 01:05:26 PM »
Just send a message
Thank you v much for your help! :D
9
Thumby / Re: Thumby unresponsive
« Last post by lennevia on March 02, 2023, 10:45:56 AM »
Can you send us a message through the contact form here?: https://tinycircuits.com/pages/contact-us

If you include your shipping address and the color of your Thumby there, we'll be able to get you a replacement for the malfunctioning Thumby.
10
Thumby / Re: New game: Flucht
« Last post by gyra on March 01, 2023, 07:28:39 PM »
I'm literally addicted to this. :D
SMF spam blocked by CleanTalk