Asked — Edited

Talking Servo / Inmoov Mouth Closed After Sentence

Hello,

i have a problem with my inmoov.

I add a "talking servo" i adjust the servo - everything is fine i have only one problem:

After a sentence the inmoov leave is mouth open. Nevermind how long or short the sentence is... the mouth is in the end still open.

I cant find any option to say after a sentence got to this servo postion.

User-inserted image

Thanx for help.

Boris


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

#41  

@Bob

Really thank you!

I hope i will finish him this year with all arms, head and torso.

And than i will make a big video for saying thank to all supporters!

Boris

United Kingdom
#42  

@Boris.

Really pleased you got it all working correctly now. I really likely the lighting you have there. Very slick. I look forward your progress, and to the "big video" when you get further in to the build.:)

#43  

@steve

Thanks also to you! You help me also a lot!

Yeah this roboter is a so big buildplace ;-) But i hope until X-mas he will be born complitly

Boris

#44  

@Bob

maybe you know a trick, how to loop a script for the neopixel ring?

I have a script for the arduino called "fade in/fade out" . Works fine solo on the Arduino ( in a loop!)

I make a Script in EZ what send a serial info to the Arduino and the script starts, but only one time and then stops!

How i make a loop?

void pulseColor(uint32_t c, uint8_t wait) {
  //Increase Brightness / Fade In
  for(int i=minBrightness; i<maxBrightness; i++) {
      strip.setBrightness(i);
      for(int x=0; x<strip.numPixels(); x++){
        strip.setPixelColor(x,c);
      }
      strip.show();
      delay(wait);
  }
  //Lower Brightness / Fade Out
  for(int i=maxBrightness; i>minBrightness; i--) {
       strip.setBrightness(i);
      for(int x=0; x<strip.numPixels(); x++){
        strip.setPixelColor(x,c);
      }
      strip.show();
      delay(wait);
  }
}

This is the fade in / fade out code

How i can loop this code?

Here is the full code:

#include <Adafruit_NeoPixel.h>


#define PIN 6
#define STRIPSIZE 24

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit...if you must, connect GND first.


// Change These Variables
int maxBrightness = 120;
int minBrightness = 15;
int fadeSpeed = 15;

void setup() {
  Serial.begin(9600);

  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {


    if (Serial.available())
    { int ib = 0;
    ib = Serial.read();

    // Stop All display
    if (ib == 66) {
    colorWipe(strip.Color(0, 0, 255), 50); // Blau
    }
    if (ib == 80){
    colorWipe(strip.Color(255, 255, 255), 50); // Weiss
    }
    if (ib == 82) {
    colorWipe(strip.Color(255, 0, 0), 50); // Rot
    }
    if (ib == 71) {
    colorWipe(strip.Color(0, 255, 0), 50); // Grün
    }
    if (ib == 87){
    colorWipe(strip.Color(0, 0, 0), 0); // Licht aus
    }
if (ib == 110){
    colorWipe(strip.Color(255, 255, 0), 50); // gelb
    }
if (ib == 120){
    colorWipe(strip.Color(255, 0, 255), 50); // magenta
    }
   if (ib == 130){
    colorWipe(strip.Color(0, 255, 255), 50); // cyan
    }
if (ib == 140){
    colorWipe(strip.Color(255, 127, 0), 50); // orange
    }
    if (ib == 150){
    colorWipe(strip.Color(224, 102, 255), 50); // flida
    }

    
  
 if (ib == 160){
  pulseColor(strip.Color(0, 0, 255), fadeSpeed);   //Set the color with Red, Gree, Blue values

}
    }
}
void colorWipe(uint32_t c, uint8_t wait) {
  for (uint16_t i = 0; i < strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

void pulseColor(uint32_t c, uint8_t wait) {
  //Increase Brightness / Fade In
  for(int i=minBrightness; i<maxBrightness; i++) {
      strip.setBrightness(i);
      for(int x=0; x<strip.numPixels(); x++){
        strip.setPixelColor(x,c);
      }
      strip.show();
      delay(wait);
  }
  //Lower Brightness / Fade Out
  for(int i=maxBrightness; i>minBrightness; i--) {
       strip.setBrightness(i);
      for(int x=0; x<strip.numPixels(); x++){
        strip.setPixelColor(x,c);
      }
      strip.show();
      delay(wait);
  }
}

#46  

Good, glad you got it all figured out. Sorry I didn't get back to you - I had to take a day off of retirement and work today!

#47  

@Bob

no prob, sometimes its better to found out yourself - you learn a lot!

Tomorrow i will make a video of the hole lightshow!

See yaa!

Boo