help first project

Hello.

I’m trying to make my first project and I’m stuck.

I have R3 uno with seeed base shield, seed 3 axis accelerometer (1.5g)
Seeed button and seeed 4 digit display.

I want to read one axis from the sensor for car acceleration for my race car and have a maximum hold feature with seeed button reset for tuning car for max accel.

Is this possible? can use MAX7219 Digital double Tube Display Module to display real time G and max hold G?

Please help me I know this is plug and play seeed base but I need code and plug location.

Hardware parts list: Seeeduino/Arduino, Base Shield, 4-digit display, accelerometer, Grove - button

Plug Grove - button onto D2 port of Base shield; accelerometer --> D4 port , accelerometer --> I2C port.

Display x-axis acceleration info on the 4-digit display. However, it’s not easy to display “-”. Maybe you can have a try.

Good luck.

[code]#include <TimerOne.h>
#include “TM1637.h”
#include <Wire.h>
#include “MMA7660.h”

int8_t TimeDisp[] = {0x00,0x00,0x00,0x00};
int data=0;

#define CLK 4//pins definitions for TM1637 and can be changed to other ports
#define DIO 5
TM1637 tm1637(CLK,DIO);

MMA7660 accelemeter;

void setup()
{
accelemeter.init();
Serial.begin(9600);
tm1637.set();
tm1637.init();
attachInterrupt(0, GoOn, CHANGE);
}

void loop()
{

   if(data>99)
 {
   tm1637.display(TimeDisp);
   delay(500);
 }
    
    else
 {

float ax,ay,az;
    accelemeter.getAcceleration(&ax,&ay,&az);
    data= abs(ax) * 100;

    if(data>99)
  {
    TimeDisp[1] = data / 100;
    TimeDisp[2] = data / 10 % 10;
    TimeDisp[3] = data % 10;
  }
    else
  {
    TimeDisp[1] = 0;  
    TimeDisp[2] = data / 10;
    TimeDisp[3] = data % 10;
  }
    
    tm1637.display(TimeDisp);
    delay(1000);
 }

}

void GoOn()
{
data=0;
}[/code]

Jacket

Hello.
Sorry for the late reply I had more than arduino issues.
I tried the code supplied with little luck but am in need of some tech.

#1
I have another problem or 2 someone may be able to help with.
I have a 3 axis accelerometer I want to use to display car straight line acceleration in G force I am using the arduino
GY-61 sensor with the z axis.
Is this correct?
And I can’t for the life of me work out the mV/G and suppliers datasheet has mV/G for 3v and 2v, this is a 5v powered version.
I need to write a spreadsheet like this for the sensor to read 1000,+0.0, 1250,+0.5.
The more values either side of zero G the better but I can use 4 either side of zero G would be sweet.

#2
I have a LM35 temp sensor, the same used on arduino.
it works fine for in car temp reading but I want to measure turbocharger inlet temp and epoxy the sensor in a threaded fitting with the IC exposed, I have bought a LM35 sensor IC only.
I have 5v powering the LM35 with a 55 ohm resistor on the ground to limit current to the IC.
When I look at the arduino LM35 it has a resistor from what looks like Ground-Vcc to signal, i’m not sure its not in front of me now.
I’m using a DLP-IO8-G for this and need to read 10mV/1deg C

Thank you for your time!!