Solar Pi

Hey :slight_smile: I would like to make a solar powered Arduino Uno for my garden which calculates Pi and outputs the numbers one by one on a blinking LED connected to PIN 13.

I already build a device that consists of an Arduino Uno + LED, Solar Panel and rechargeable batteries. Works fine!
But I just can’t get the code right :frowning:

Here is how it should work:

Pi = 3,1415…

  1. Arduino blinks 3 times which stands for the first Digit. One second Pause.
  2. Then Arduino calculates the next digit which is 1.
  3. The LED should blink 1 time.
  4. One Second Pause.
  5. Arduino can forget about the 1, I never need it again.
  6. Arduino calculates the next Digit which is 4.
  7. The LED should blink 4 times.
  8. One second pause.
  9. And that’s how it should continue forevermore…

I tried to modify sketches like:

But didn’t work out at all…

If anyone knows how to do it and could write the whole code and send it to me I’d be happy to pay for it over paypal.

Solved it myself thank you anyways :slight_smile:

I'd be interested in how you are calculating each digit of PI.

May I suggest, are you calculating the pi something like;

for (i=10, i<unsigned long digit limit, i=i10)
round(i
pi) % i;

?