Recent Posts

Pages: [1] 2 3 ... 10
Programming Questions / Re: SimbleeBLE - Did you forge...
Last post by pert - Today at 06:32 am
Also posted at:
If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.
Programming Questions / Re: New issue with NewLiquidCr...
Last post by pert - Today at 06:31 am
The frustrating thing is that there are multiple libraries of the same name but with different APIs. So it may be that you updated to a different library of the same name. Or maybe the API of the library you were using changed since the version you were using previously. You have the choice of updating your code according to the new API or finding a library/version compatible with your code.

It's a good idea to document the dependencies of your projects with links to where they can be downloaded from and which version the code was written for. That only takes a few seconds while you're writing the project and can save you or someone else a ton of time and frustration later. I like to add a comment after the #include directive for each external dependency.
General Electronics / Re: What happens when battery ...
Last post by INTP - Today at 06:28 am
So alternators put out various voltages, and transistor based regulators use a sort of PWM of about 2000Hz to regulate the output voltage. Interesting, but still doesn't satisfy my curiosity. It still sounds like alternators indiscriminately put out 13-15 volts, always, when engine is running. They never stop trying to top up the batteries when the voltage gradient swings that way.
Programming Questions / Servo Programming Help
Last post by btk1241 - Today at 06:28 am
Hello, I am making a programmable airsoft target with a servo motor.  I've included my code, as you can see, I initialize 2 buttons, but am only using 1.  The first button initiates the While loop and loops the target program, what I would like to do is have the second button break this loop, can anyone give me input on how to do that? Initiating an IF statement in the loop then using the break command doesn't seem to work. The code I have so far works with Button 1, I know my setup is correct because the buttons both work with other types of codes.  I am new to Arduino Programming so let me know If I'm an idiot or making a trivial mistake.  Thanks :)

Here is my code:

#include <Servo.h>

Servo myservo;  // create servo object to control a servo

int buttonState = 0;         // variable for reading the pushbutton status

int buttonState2 = 0;        // variable for reading the pushbutton status

const int buttonPin = 2;     // the number of the pushbutton pin

const int buttonPin2 = 3;    // the number of the pushbutton pin

void setup() {

  myservo.attach( 8 );  // attaches the servo on pin 8 to the servo object

  pinMode(buttonPin, INPUT_PULLUP);

  pinMode(buttonPin2, INPUT_PULLUP);

void loop() {

  buttonState = digitalRead(buttonPin);

  buttonState2 = digitalRead(buttonPin2);
 while (buttonState == LOW) {
    myservo.write(173);              // tell target to go to position not viewable
    randomSeed(millis()); //specifies unit for time function

  delay(random(3000,10000)); //delays a random time between 3 and 10 seconds

  myservo.write(97); // target goes to viewable position

  delay(4000); // target stays in position for certain amount of time

There is a small difference because the SPI pins on the Mega are different than the Uno. The easiest way to handle this is to make the connections between the ICSP headers:
Programmer | Target
MOSI       | MOSI
Vcc        | Vcc
SCK        | SCK
MISO       | MISO
10         | Reset
GND        | GND

ICSP header pinout:

That wiring will work with any standard AVR Arduino board.

If that wiring is not convenient to you then you can use the same wiring as shown in the Uno "Arduino as ISP" tutorials:

But before you upload File > Examples > 11.ArduinoISP > ArduinoISP you need to change line 81 from:
Code: [Select]
Code: [Select]
Marine Muscle  Accordingly the three suppers that they are to be served would be a mid morning one, one at mid evening and the third after supper in the late evening. Since no suppers will be permitted at schools, they are to be given 'fluid dinners'. Non fat drain blended with protein powder will be a decent nutritious fluid to taste between classes. Fill their water bottles with it, or send in a canteen carafe.
Yeap! Seems that WU changed smth again.
I cant update my PWS too
Français / Re: Portée émetteur récepteur ...
Last post by kayel - Today at 06:20 am


Deutsch / Re: LED Strip Blinker sehr lan...
Last post by wno158 - Today at 06:20 am
Vielleicht wäre es eine Überlegung wert (wenn Du schon mit delay() arbeiten willst) die Wartezeit automatisch an die vorher verstrichene Zeit zum Setzen der Pixel anzupassen:

Code: [Select]

  unsigned long vorher;
  unsigned long nachher;

  vorher = millis();
  for(uint16_t i=0; i<300; i++) {
    strip.setPixelColor(i, strip.Color(  255, 55, 0));;
  nachher = millis();
  delay(400 - (nachher-vorher));

Gruß Walter
Pages: [1] 2 3 ... 10