Things used in this project

Hardware components:
Pi 3 02
Raspberry Pi 3 Model B
×1
Software apps and online services:
Snappy%20(1)
Ubuntu Snappy Ubuntu Core
OS of your choice. Either Ubuntu 16.04, Ubuntu 14.04 or Windows 10 IoT Core.
10
Microsoft Windows 10 IoT Core
OS of your choice. Either Ubuntu 16.04, Ubuntu 14.04 or Windows 10 IoT Core.
Vs2015logo
Microsoft Visual Studio 2015
IDE for making your own .Net Core app. Not required, but recommended if you want to make your own app.

Code

Program.csC#
Code for the Pi calculation program.
using System;
using System.Threading;
namespace picalc
{
    class Program
    {
        static string[] text = {
@"      ___                       ___           ___           ___       ___     ",
@"     /\  \          ___        /\  \         /\  \         /\__\     /\  \    ",
@"    /::\  \        /\  \      /::\  \       /::\  \       /:/  /    /::\  \   ",
@"   /:/\:\  \       \:\  \    /:/\:\  \     /:/\:\  \     /:/  /    /:/\:\  \  ",
@"  /::\~\:\  \      /::\__\  /:/  \:\  \   /::\~\:\  \   /:/  /    /:/  \:\  \ ",
@" /:/\:\ \:\__\  __/:/\/__/ /:/__/ \:\__\ /:/\:\ \:\__\ /:/__/    /:/__/ \:\__\",
@" \/__\:\/:/  / /\/:/  /    \:\  \  \/__/ \/__\:\/:/  / \:\  \    \:\  \  \/__/",
@"      \::/  /  \::/__/      \:\  \            \::/  /   \:\  \    \:\  \      ",
@"       \/__/    \:\__\       \:\  \           /:/  /     \:\  \    \:\  \     ",
@"                 \/__/        \:\__\         /:/  /       \:\__\    \:\__\    ",
@"                               \/__/         \/__/         \/__/     \/__/    " };
        static double Pi = 0;
        static double n = 1;
        static long i = 0L;

        static void Main(string[] args)
        {
            foreach (string s in text)
            {
                Console.WriteLine(s);
            }
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine();
            while (i < long.MaxValue)
            {
                Console.SetCursorPosition(0, Console.CursorTop - 1);
                ClearCurrentConsoleLine();
                Pi += (4.0 / n);
                n += 2.0;
                Pi -= (4.0 / n);
                n += 2.0;
                Console.WriteLine("Generated value of Pi: " + Pi);
                i++;
                Thread.Sleep(50);
            }

        }
        public static void ClearCurrentConsoleLine()
        {
            int currentLineCursor = Console.CursorTop;
            Console.SetCursorPosition(0, Console.CursorTop);
            Console.Write(new string(' ', Console.WindowWidth));
            Console.SetCursorPosition(0, currentLineCursor);
        }

    }
}

Credits

13089067
Rastko Đorđević

A 14 year old that loves programming and IoT.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

MPU6050 accelerometer on Windows 10 Raspberry 2
Easy
  • 78
  • 1

Protip

Using MPU6050 accelerometer data on Windows 10 Raspberry 2 to control model's roll and pitch with DirectX12XTK and ImGui

Forgot Something: The Calliope-Remembrall will Remind You
Easy
  • 253
  • 2

Work in progress

This is an utterly useless project since this magical object is quite useless. Everybody forgets stuff, naturally.

Break Your Heart - IoT Project - Blinky - 2 LEDs
Easy
  • 237
  • 3

Full instructions

The Blinky project with two LEDs.

Break your heart - IoT Project - IoT Blocky
Easy
  • 702
  • 4

Protip

Use this project to control the LEDs on the Raspberry Pi Sense HAT.

Windows Remote Arduino (Windows Remote Arduino Experience)
Easy
  • 75
  • 0

Protip

Break your heart - The Windows Remote Arduino Experience allows you to blinking LEDs on the Arduino

Add projectSign up / Login