Ik kan je niet helpen.
Een PDF van een screenshot is verspilling. Sla je plaatje op als jpg/png/... and voeg het bij als aanhangsel. Als het forum goed werkt wordt het plaatje automatisch geplaatst in je post.
Verder voegt het plaatje niks toe aan je post.
Voor anderen:
- faultarduino.txt
Arduino: 1.8.9 (Windows 10), Board:"ATtiny25/45/85, ATtiny85, Internal 8 MHz"
Build-opties gewijzigd, alles wordt opnieuw gebuild
In file included from C:\Users\Erny\Documents\Arduino\Modern_Bike_Tail_Light_ATtiny\Modern_Bike_Tail_Light_ATtiny.ino:8:0:
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/FastLED.h:14:21: note: #pragma message: FastLED version 3.004.000
# pragma message "FastLED version 3.004.000"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/FastLED.h:65:0,
from C:\Users\Erny\Documents\Arduino\Modern_Bike_Tail_Light_ATtiny\Modern_Bike_Tail_Light_ATtiny.ino:8:
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/fastspi.h:135:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output
# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/FastLED.h:48:0,
from C:\Users\Erny\Documents\Arduino\Modern_Bike_Tail_Light_ATtiny\Modern_Bike_Tail_Light_ATtiny.ino:8:
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/fastpin.h: In instantiation of 'class FastPin<7>':
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/platforms/avr/clockless_trinket.h:100:49: required from 'class ClocklessController<7, 2, 5, 3, (EOrder)66, 0, false, 10>'
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/chipsets.h:474:7: required from 'class WS2812Controller800Khz<7, (EOrder)66>'
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/FastLED.h:103:52: required from 'class WS2812<7, (EOrder)66>'
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/FastLED.h:302:39: required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2812; unsigned char DATA_PIN = 7; EOrder RGB_ORDER = (EOrder)66]'
C:\Users\Erny\Documents\Arduino\Modern_Bike_Tail_Light_ATtiny\Modern_Bike_Tail_Light_ATtiny.ino:31:56: required from here
C:\Users\Erny\Documents\Arduino\libraries\FastLED\src/fastpin.h:210:2: error: static assertion failed: Invalid pin specified
static_assert(validpin(), "Invalid pin specified");
^~~~~~~~~~~~~
Meerdere bibliotheken gevonden voor "FastLED.h"
Gebruikt: C:\Users\Erny\Documents\Arduino\libraries\FastLED
Niet gebruikt: C:\Users\Erny\Documents\Arduino\libraries\FastLED-FastLED3.1
exit status 1
Fout bij het compileren voor board ATtiny25/45/85
Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
optie aan in Bestand -> Voorkeuren.
- Modern_Bike_Tail_Light_ATtiny.ino
// HAZI TECH
// Program by Hasitha Jayasundara
// Subscribe to my YouTube Channel - http://www.youtube.com/c/HAZITECH?sub_confirmation=1
#include "Arduino.h"
#include <FastLED.h>
#define LED_TYPE WS2812B // These are the type of led strips we are using.
#define DATA_PIN A1 //LED Strip Signal Connection
#define BrakeSignal A0 //Brake Signal Connection
#define LeftSignal A3 //Left Blinker Signal Connection
#define RightSignal A2 //Right Blinker Signal Connection
#define NUM_LEDS 34 //Total no of LEDs in the LED strip
#define BlinkerLEDs 17
//LEDs for Left/Right Blinker
int BlinkerSpeed = 30; //Blinker Running LED Speed. Adjust this to match with your Bike blinker speed.
int BlinkerOffDelay = 300; //Blinker Off time. Adjust this to match with your Bike blinker speed.
CRGB leds[NUM_LEDS];
void setup()
{
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
pinMode(BrakeSignal, INPUT);
pinMode(LeftSignal, INPUT);
pinMode(RightSignal, INPUT);
for (int i = 0; i < (NUM_LEDS / 2); i++)
{
leds[i] = CRGB(60, 0, 0);
leds[i - 1] = CRGB(0, 0, 0);
leds[(NUM_LEDS - 1) - i] = CRGB(60, 0, 0);
leds[(NUM_LEDS) - i] = CRGB(0, 0, 0);
FastLED.show();
delay (BlinkerSpeed);
}
for (int j = ((NUM_LEDS / 2) - 1); j >= 0; j--)
{
leds[j] = CRGB(60, 0, 0);
leds[(NUM_LEDS / 2 - 1) + ((NUM_LEDS / 2) - j)] = CRGB(60, 0, 0);
FastLED.show();
delay (BlinkerSpeed);
}
for (int i = 0; i < 5; i++)
{
for (int i = 0; i < NUM_LEDS; i++)
{
leds[i] = CRGB(0, 0, 0);
}
FastLED.show();
delay (75);
for (int i = 0; i < NUM_LEDS; i++)
{
leds[i] = CRGB(60, 0, 0);
}
FastLED.show();
delay (50);
}
}
void loop()
{
if ((digitalRead(LeftSignal) == 0) && (digitalRead(RightSignal) == 0) && (digitalRead(BrakeSignal) == 0)) //Park Light
{
ParkFull();
}
if ((digitalRead(BrakeSignal) == 1) && (digitalRead(LeftSignal) == 0) && (digitalRead(RightSignal) == 0)) //Break Light
{
BrakeFull();
}
if ((digitalRead(LeftSignal) == 1) && (digitalRead(RightSignal) == 0) && (digitalRead(BrakeSignal) == 0)) //Left Blinker
{
LeftDim();
RightLit();
LeftBlinker();
LeftDim();
delay (BlinkerOffDelay);
}
if ((digitalRead(RightSignal) == 1) && (digitalRead(LeftSignal) == 0) && (digitalRead(BrakeSignal) == 0)) //Right Blinker
{
RightDim();
LeftLit();
RightBlinker();
RightDim();
delay (BlinkerOffDelay);
}
if ((digitalRead(LeftSignal) == 1) && (digitalRead(RightSignal) == 0) && (digitalRead(BrakeSignal) == 1)) //Left Blinker & Brake
{
LeftDim();
RightFull();
LeftBlinker();
LeftDim();
delay (BlinkerOffDelay);
}
if ((digitalRead(RightSignal) == 1) && (digitalRead(LeftSignal) == 0) && (digitalRead(BrakeSignal) == 1)) //Right Blinker & Brake
{
RightDim();
LeftFull();
RightBlinker();
RightDim();
delay (BlinkerOffDelay);
}
if ((digitalRead(LeftSignal) == 1) && (digitalRead(RightSignal) == 1) && (digitalRead(BrakeSignal) == 0)) //Dual Blinker / Hazard
{
LeftDim();
RightDim();
ParkMiddle();
DualBlinker();
LeftDim();
RightDim();
delay (BlinkerOffDelay);
}
if ((digitalRead(LeftSignal) == 1) && (digitalRead(RightSignal) == 1) && (digitalRead(BrakeSignal) == 1)) //Dual Blinker / Hazard + Brake
{
LeftDim();
RightDim();
BrakeMiddle();
DualBlinker();
LeftDim();
RightDim();
delay (BlinkerOffDelay);
}
}
void BrakeFull()
{
for (int i = 0; i < NUM_LEDS; i++)
{
leds[i] = CRGB(255, 0, 0);
}
FastLED.show();
}
void BrakeMiddle()
{
for (int i = BlinkerLEDs; i < (NUM_LEDS - BlinkerLEDs); i++)
{
leds[i] = CRGB(255, 0, 0);
}
FastLED.show();
}
void ParkFull()
{
for (int i = 0; i < NUM_LEDS; i++)
{
leds[i] = CRGB(60, 60, 60);
}
FastLED.show();
}
void ParkMiddle()
{
for (int i = BlinkerLEDs; i < (NUM_LEDS - BlinkerLEDs); i++)
{
leds[i] = CRGB(60, 0, 0);
}
FastLED.show();
}
void LeftBlinker()
{
for (int i = (BlinkerLEDs - 1); i >= 0; i--)
{
leds[i] = CRGB(255, 60, 0);
FastLED.show();
delay (BlinkerSpeed);
}
}
void LeftDim()
{
for (int i = 0; i < BlinkerLEDs; i++)
{
leds[i] = CRGB(0, 0, 0);
}
FastLED.show();
}
void LeftLit()
{
for (int i = 0; i < (NUM_LEDS - BlinkerLEDs); i++)
{
leds[i] = CRGB(20, 20, 20);
}
FastLED.show();
}
void LeftFull()
{
for (int i = 0; i < (NUM_LEDS - BlinkerLEDs); i++)
{
leds[i] = CRGB(255, 0, 0);
}
FastLED.show();
}
void RightBlinker()
{
for (int i = (NUM_LEDS - BlinkerLEDs); i < NUM_LEDS; i++)
{
leds[i] = CRGB(255, 60, 0);
FastLED.show();
delay (BlinkerSpeed);
}
}
void RightDim()
{
for (int i = (NUM_LEDS - BlinkerLEDs); i < NUM_LEDS; i++)
{
leds[i] = CRGB(0, 0, 0);
}
FastLED.show();
}
void RightLit()
{
for (int i = BlinkerLEDs; i < NUM_LEDS; i++)
{
leds[i] = CRGB(20, 20, 20);
}
FastLED.show();
}
void RightFull()
{
for (int i = BlinkerLEDs; i < NUM_LEDS; i++)
{
leds[i] = CRGB(255, 0, 0);
}
FastLED.show();
}
void DualBlinker()
{
for (int i = (BlinkerLEDs - 1); i >= 0; i--)
{
leds[i] = CRGB(255, 65, 0);
leds[NUM_LEDS - 1 - i] = CRGB(255, 65, 0);
FastLED.show();
delay (BlinkerSpeed);
}
}