it is 1.224 I downloaded today. I guess it is last version.
I tried 30 min. ago and it didnt give error but still keep saying low power. İt connected to the battery and also pc from usb. This one before I enabled Fastled. I just wanted to try.
Yes. I enabled FastLED in the graflex_v1 and try to upload but it gives this error.
Do you have ENABLE_WS2811 on as well?
Looks like it might need it.
If that doesn't help, I can try to provide a new beta later today.
I was going to update my message. Yes I looked normal files and it should be enabled too but after it gives error again. it starts with pragma message like I copied before and all after is kinda same. I appreciate it thank you.
In file included from C:\Users\Murat\AppData\Local\Temp\arduino_build_627516\sketch\blades/fastled_blade.h:6:0,
from C:\Users\Murat\Downloads\lightsaber-1.224 (1)\lightsaber\lightsaber.ino:1231:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FastLED/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008
# pragma message "FastLED version 3.001.008"
^
In file included from C:\Users\Murat\Downloads\lightsaber-1.224 (1)\lightsaber\lightsaber.ino:1231:0:
C:\Users\Murat\AppData\Local\Temp\arduino_build_627516\sketch\blades/fastled_blade.h:71:21: error: 'Color' has not been declared
void set(int led, Color c) override {
^
Error compiling for board Teensy 3.2 / 3.1.
The pragma message can be ignored, but the other one indicates that the fastled stuff is currently broken.
I will have a go at fixing it later today.
I think it should at least compile now. Please try this beta version:
http://fredrik.hubbe.net/lightsaber/lightsaber-1.240.zip
Thank you, I tried and it didn't give an error. But I guess power pin changed and became 1. I tried few times to push the button and open it but nothing happened. maybe I'm doing something wrong. I will look into it.
I took fastledblade file and change it in the 1.224. it uploaded without error but keep saying again low power in that version.
teensymonitor writes this over and over again.
Motion setup ... failed.
Motion chip timeout, reboot motion chip!
Motion setup ... failed.
Motion chip timeout, reboot motion chip!
I checked with another code that works with motion and light.
// Full orientation sensing using NXP's advanced sensor fusion algorithm.
//
// You *must* perform a magnetic calibration before this code will work.
//
// To view this data, use the Arduino Serial Monitor to watch the
// scrolling angles, or run the OrientationVisualiser example in Processing.
#include <NXPMotionSense.h>
#include <Wire.h>
#include <EEPROM.h>
#include <FastLED.h>
#define NUM_LEDS 60
CRGB leds[NUM_LEDS];
NXPMotionSense imu;
NXPSensorFusion filter;
int a;
int acc_rms;
void setup() {
Serial.begin(9600);
imu.begin();
filter.begin(100);
delay(2000);
FastLED.addLeds<APA102,11,13,BGR,DATA_RATE_MHZ(1)>(leds, NUM_LEDS);
pinMode(7, OUTPUT);
digitalWrite(7, HIGH); // enable access to LEDs
}
void loop() {
float ax, ay, az;
float gx, gy, gz;
float mx, my, mz;
float roll, pitch, heading;
if (imu.available()) {
// Read the motion sensors
imu.readMotionSensor(ax, ay, az, gx, gy, gz, mx, my, mz);
// Update the SensorFusion filter
filter.update(gx, gy, gz, ax, ay, az, mx, my, mz);
// print the heading, pitch and roll
roll = filter.getRoll();
pitch = filter.getPitch();
heading = filter.getYaw();
Serial.print("Orientation: ");
Serial.print(heading);
Serial.print(" ");
Serial.print(pitch);
Serial.print(" ");
Serial.println(roll);
a=abs(roll/3);
Serial.print(" ");
acc_rms=sqrt(ax*ax+ay*ay+az*az)/3;
Serial.println(acc_rms);
//flash red if a violent shake event is detected
if(acc_rms==1)
{
for(int n = 0; n < NUM_LEDS; n++)
{
leds[n] = CRGB::Red;
FastLED.show();
delay(8);
leds[n] = CRGB::Black;
}
}
// Move a single white led as per rotation
for(int n = 0; n < NUM_LEDS; n++)
{
if(a==n)
{
leds[n] = CRGB::White;
FastLED.show();
delay(8);
}
else
{
leds[n] = CRGB::Black;
}
}
}
}
I deleted some code, this part
#endif
#if defined(ENABLE_MOTION) || defined(ENABLE_SSD1306)
#include "common/i2cdevice.h"
I2CBus i2cbus;
#endif
#ifdef ENABLE_MOTION
#include "motion/mpu6050.h"
#include "motion/lsm6ds3h.h"
#include "motion/fxos8700.h"
#include "motion/fxas21002.h"
and just made it #define enabled_motion it doesn't say anymore andteensymonitor shows ignition power on etc. but lights don't open. Also no sound too. I tried beep but nothing comes.