Warning, Taboo ! Video and code included

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Mac_840
 
Posts: 46
Joined: Sat Aug 19, 2017 2:26 pm

Re: Warning, Taboo ! Video and code included

Post by Mac_840 »

Ok I will give that a try when I get home, the 5 hour time difference sure makes things difficult.
@kcl1s I'd appreciate any help your willing to offer, there are a number of questions I haven't posted, mainly just some clarification. [email protected] send me an email if your interested.

User avatar
Mac_840
 
Posts: 46
Joined: Sat Aug 19, 2017 2:26 pm

Re: Warning, Taboo ! Video and code included

Post by Mac_840 »

Code: Select all

#include <Adafruit_NeoPixel.h>

#define NUMPIXELS      8
#define PIN            6
#define BUTTON3_PIN   11
#define BUTTON4_PIN   12
enum  frame { FRAME0, FRAME1, FRAME2 };
 //uint16_t frame;  // current step within the pattern
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
  class faceframe : public Adafruit_NeoPixel
{
public: 
 
  //int pos;              // current servo position 
 frame  activeframe;
 int  updateInterval;      // interval between updates
 void (*OnComplete)();
 
  unsigned long lastUpdate; // last update of position
  unsigned long Interval;   // milliseconds between updates
 faceframe(uint16_t pixels,  uint8_t pin, uint8_t type, void (*callback)())
    :Adafruit_NeoPixel(pixels, pin, type)

 {
        OnComplete = callback;
    }


 
  void frameUpdate()
   {
      if((millis() - lastUpdate) > updateInterval)  // time to update
      {
        activeframe = (int)(activeframe + 1);
         lastUpdate = millis();
       
         Serial.println(activeframe);
         
         switch (activeframe)
         {

Code: Select all

frame_update.ino: In member function ‘void faceframe::frameUpdate()’:
frame_update.ino:34:41: error: invalid conversion from ‘int’ to ‘frame’ [-fpermissive]
frame_update.ino: In member function ‘void faceframe::frame0(uint8_t)’:
frame_update.ino:66:12: error: request for member ‘setPixelColor’ in ‘((faceframe*)this)->faceframe::<anonymous>.Adafruit_NeoPixel::pixels’, which is of non-class type ‘uint8_t* {aka unsigned char*}’
frame_update.ino:66:36: error: request for member ‘

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”