Fan RPM detection issue

H,

I was recently building up some small project for FAN regulation and measuring temperature with output on a display. I have at first started to use a 3 pin FAN and used this project as a reference for controlling the rotation of the FAN: https://www.baldengineer.com/pwm-3-pin-pc-fan-arduino.html. This was working nicely and the RPM was detected right, however, the FAN made a noise while lowering the RPM and thus I have decided to go with a 4 pin FAN, Arduino nano and changing the PWM frequency using the timers. Again, I have used this as a reference: How to properly control PWM fans with Arduino - Federico Dossena. The PWM regulation works like a charm, however, the RPM detection went crazy.

It shows good RPM at full speed of the FAN, however, by lowering the PWM signal, the RPM goes like 6000 instead of app. 1000RPM. I am using an Noctua FAN but tried as well a few different ones, the same result. No idea why it is happening. The tachometer pin is through an pullup resistor and a C is used for filtering. Again, the schematic is as in the reference here: https://www.baldengineer.com/pwm-3-pin-pc-fan-arduino.html. Below the code I am using, honestly, I have no clue what to do next. Any suggestion will be appreciated. thx, Tomas

/**************************************************************************
  Abakus FAN controler


  Written by Tomalf.
 **************************************************************************/
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>             // Arduino SPI library
// Include custom fonts, refer to Ardafruit
//#include <Fonts/FreeMonoBoldOblique12pt7b.h>

//if using extern constants or reading from memorz, use the below
//extern const uint16_t PROGMEM NF_P14[2600];

static const unsigned char PROGMEM thermometer_icon[]  = {
  0x00, 0x0F, 0x80, 0x00, 0x18, 0xC0, 0x00, 0x20, 0x20, 0x00, 0x21, 0xE0, 0x00, 0x20, 0x20, 0x00,
  0x27, 0xE0, 0x00, 0x20, 0x20, 0x00, 0x21, 0xE0, 0x00, 0x20, 0x20, 0x00, 0x27, 0xE0, 0x00, 0x20,
  0x20, 0x00, 0x21, 0xE0, 0x00, 0x20, 0x20, 0x00, 0x27, 0xE0, 0x00, 0x20, 0x20, 0x00, 0x21, 0xE0,
  0x00, 0x20, 0x20, 0x00, 0x27, 0xE0, 0x00, 0x20, 0x20, 0x00, 0x2C, 0x20, 0x00, 0x2E, 0x20, 0x00,
  0x2F, 0xA0, 0x00, 0x6F, 0xB0, 0x00, 0x8F, 0x88, 0x00, 0x8F, 0x88, 0x01, 0x1F, 0xC4, 0x01, 0x1F,
  0xC4, 0x01, 0x3F, 0xE4, 0x01, 0x3E, 0x64, 0x01, 0x3E, 0x64, 0x00, 0x9F, 0xC8, 0x00, 0x9F, 0xC8,
  0x00, 0x47, 0x10, 0x00, 0x30, 0x60, 0x00, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

// 'fan', 70x70px generated by http://javl.github.io/image2cpp/
// Color export http://www.rinkydinkelectronics.com/t_imageconverter565.php
const unsigned char fanfan [] PROGMEM = {
  0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf1, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c, 0xff,
  0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff,
  0xfc, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x07, 0xfe, 0x00,
  0x7f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0x00, 0x1f, 0xff, 0xfc, 0xff, 0xff, 0xc0, 0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, 0xf0, 0xf8, 0x7f, 0xfc, 0xff, 0xfc, 0x3f,
  0xfc, 0x1f, 0xf0, 0xf0, 0xff, 0xfc, 0xff, 0xfc, 0x1f, 0xf0, 0x3f, 0xf0, 0xe0, 0xff, 0xfc, 0xff,
  0xfe, 0x0f, 0xe0, 0x7f, 0xf0, 0x01, 0xff, 0xfc, 0xff, 0xff, 0x83, 0x00, 0xff, 0xe0, 0x07, 0xff,
  0xfc, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xe0, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xc0,
  0x1f, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x01, 0xff, 0x80, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xfe, 0x00,
  0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff, 0xfc, 0xff, 0xff,
  0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c,
  0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
};

// 'propeler1_7', 70x70px
const unsigned char fan_propeler1_7 [] PROGMEM = {
  0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf1, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c, 0xff,
  0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff,
  0xfc, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x01, 0xff, 0xc0,
  0x7f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xc0, 0x1f, 0xff, 0xfc, 0xff, 0xff, 0xc0, 0x03,
  0xff, 0xc0, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0x87, 0x07, 0xff, 0x80, 0x07, 0xff, 0xfc, 0xff, 0xff,
  0x0f, 0x07, 0xff, 0x00, 0x03, 0xff, 0xfc, 0xff, 0xfe, 0x1f, 0x0f, 0xfe, 0x03, 0xe1, 0xff, 0xfc,
  0xff, 0xfc, 0x3f, 0x0f, 0xfc, 0x0f, 0xf0, 0xff, 0xfc, 0xff, 0xf8, 0x7f, 0x0f, 0xf8, 0x1f, 0xf8,
  0x7f, 0xfc, 0xff, 0xf0, 0xff, 0x0f, 0xf0, 0x3f, 0xfc, 0x3f, 0xfc, 0xff, 0xe1, 0xff, 0x0f, 0xf0,
  0xff, 0xfe, 0x1f, 0xfc, 0xff, 0xe1, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xc1, 0xff,
  0x0f, 0xe1, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0xc1, 0xff, 0x8f, 0xe3, 0xff, 0xff, 0x8f, 0xfc, 0xff,
  0x80, 0xff,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x8f, 0xf8, 0x03, 0xfc, 0xff, 0x00, 0x00, 0xff,
  0x8f, 0x8f, 0xfc, 0x03, 0xfc, 0xff, 0x80, 0x03, 0xff, 0x8f, 0x87, 0xfc, 0x07, 0xfc, 0xff, 0x87,
  0xff, 0xff, 0x1f, 0xc7, 0xfe, 0x07, 0xfc, 0xff, 0xc7, 0xff, 0xff, 0x1f, 0xc3, 0xfe, 0x0f, 0xfc,
  0xff, 0xc3, 0xff, 0xfe, 0x1f, 0xc3, 0xfe, 0x0f, 0xfc, 0xff, 0xe3, 0xff, 0xfc, 0x3f, 0xc3, 0xfe,
  0x1f, 0xfc, 0xff, 0xe1, 0xff, 0xf8, 0x3f, 0xc3, 0xfe, 0x1f, 0xfc, 0xff, 0xf0, 0xff, 0xf0, 0x7f,
  0xc3, 0xfc, 0x3f, 0xfc, 0xff, 0xf8, 0x7f, 0xe0, 0x7f, 0xc3, 0xf8, 0x7f, 0xfc, 0xff, 0xfc, 0x3f,
  0x80, 0xff, 0xc3, 0xf0, 0xff, 0xfc, 0xff, 0xfc, 0x1c, 0x01, 0xff, 0xc3, 0xe0, 0xff, 0xfc, 0xff,
  0xfe, 0x00, 0x03, 0xff, 0x83, 0xc1, 0xff, 0xfc, 0xff, 0xff, 0x80, 0x07, 0xff, 0x83, 0x07, 0xff,
  0xfc, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0x00, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x0f, 0xfe, 0x00,
  0x1f, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x03, 0xfe, 0x00, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xfe, 0x00,
  0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff, 0xfc, 0xff, 0xff,
  0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c,
  0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
};

// 'propeler1_15', 70x70px
const unsigned char fan_15propeler1_15 [] PROGMEM = {
  0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf1, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c, 0xff,
  0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff,
  0xfc, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0xc0,
  0x7f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x00, 0x7f, 0xf0, 0x1f, 0xff, 0xfc, 0xff, 0xff, 0xc1, 0xe0,
  0xff, 0xfc, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0x83, 0xe0, 0xff, 0xf8, 0x07, 0xff, 0xfc, 0xff, 0xff,
  0x0f, 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0x0f, 0xfe, 0x0f, 0xe0, 0xff, 0xfc, 0xff,
  0xfe, 0x00, 0x3f, 0xfe, 0x1f, 0xc1, 0xff, 0xfc, 0xff, 0xff, 0x80, 0x7f, 0xfc, 0x1f, 0x07, 0xff,
  0xfc, 0xff, 0xff, 0xc0, 0x7f, 0xfc, 0x1e, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x3f, 0xf8, 0x00,
  0x1f, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x0f, 0xf0, 0x00, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xfe, 0x00,
  0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff, 0xfc, 0xff, 0xff,
  0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c,
  0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
};

// 'propeler1_22', 70x70px
const unsigned char fan_propeler1_22 [] PROGMEM = {
  0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x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 0xff, 0xff, 0xff,
  0xff, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
};

// 'propeler1_30', 70x70px
const unsigned char fan_30propeler1_30 [] PROGMEM = {
  0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf1, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c, 0xff,
  0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff,
  0xfc, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x07, 0x80, 0x00,
  0x7f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x3f, 0x80, 0xf0, 0x1f, 0xff, 0xfc, 0xff, 0xff, 0xc0, 0xff,
  0x83, 0xfe, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0x83, 0xff, 0x07, 0xff, 0x87, 0xff, 0xfc, 0xff, 0xff,
  0x03, 0xfe, 0x0f, 0xff, 0xc3, 0xff, 0xfc, 0xff, 0xfe, 0x03, 0xfe, 0x0f, 0xff, 0xe1, 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xff, 0xff, 0x87, 0xff, 0x83, 0xff, 0x07, 0xff,
  0xfc, 0xff, 0xff, 0xc1, 0xff, 0x07, 0xfe, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x3c, 0x07, 0xf0,
  0x1f, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x00, 0x07, 0x80, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xfe, 0x00,
  0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff, 0xfc, 0xff, 0xff,
  0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c,
  0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
};

// 'propeler1_37', 70x70px
const unsigned char fan_propeler1_37 [] PROGMEM = {
  0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf1, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c, 0xff,
  0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff,
  0xfc, 0xff, 0xff, 0xfe, 0x00, 0x60, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x07, 0xf0, 0x00,
  0x7f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x3f, 0xf0, 0x00, 0x1f, 0xff, 0xfc, 0xff, 0xff, 0xc0, 0x7f,
  0xe0, 0x3e, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0x80, 0x7f, 0xe0, 0xff, 0x87, 0xff, 0xfc, 0xff, 0xff,
  0x00, 0xff, 0xc1, 0xff, 0xc3, 0xff, 0xfc, 0xff, 0xfe, 0x00, 0xff, 0x83, 0xff, 0xf1, 0xff, 0xfc,
  0xff, 0xfc, 0x20, 0xff, 0x83, 0xff, 0xf8, 0xff, 0xfc, 0xff, 0xf8, 0x60, 0xff, 0x87, 0xff, 0xf8,
  0x7f, 0xfc, 0xff, 0xf0, 0xf0, 0xff, 0x0f, 0xff, 0xf8, 0x3f, 0xfc, 0xff, 0xe1, 0xf0, 0xff, 0x0f,
  0xff, 0x80, 0x1f, 0xfc, 0xff, 0xe3, 0xf0, 0xff, 0x0f, 0xfc, 0x00, 0x1f, 0xfc, 0xff, 0xc3, 0xf0,
  0xff, 0x1f, 0xf0, 0x00, 0x0f, 0xfc, 0xff, 0xc7, 0xf0, 0x7f, 0x1f, 0xe0, 0x00, 0x0f, 0xfc, 0xff,
  0x87, 0xf8, 0x7f, 0x1f, 0xc0, 0x3c, 0x07, 0xfc, 0xff, 0x8f, 0xf8, 0x3f, 0x1f, 0x81, 0xff, 0x87,
  0xfc, 0xff, 0x0f, 0xfc, 0x3f, 0x3f, 0x07, 0xff, 0xe3, 0xfc, 0xff, 0x0f, 0xfe, 0x3f, 0xfe, 0x1f,
  0xff, 0xe3, 0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0, 0x00, 0x1f, 0xe3, 0xfc, 0x3f, 0x8f, 0xfc,
  0xff, 0xc0, 0x00, 0x7f, 0xe3, 0xfc, 0x3f, 0x0f, 0xfc, 0xff, 0xe0, 0x01, 0xff, 0xe3, 0xfc, 0x1f,
  0x1f, 0xfc, 0xff, 0xe0, 0x3f, 0xff, 0xc3, 0xfc, 0x1e, 0x1f, 0xfc, 0xff, 0xf0, 0x7f, 0xff, 0xc3,
  0xfe, 0x1c, 0x3f, 0xfc, 0xff, 0xf8, 0x7f, 0xff, 0x83, 0xfe, 0x18, 0x7f, 0xfc, 0xff, 0xfc, 0x3f,
  0xff, 0x07, 0xfc, 0x00, 0xff, 0xfc, 0xff, 0xfc, 0x0f, 0xfe, 0x07, 0xfc, 0x00, 0xff, 0xfc, 0xff,
  0xfe, 0x07, 0xfc, 0x0f, 0xfc, 0x01, 0xff, 0xfc, 0xff, 0xff, 0x83, 0xf8, 0x1f, 0xfc, 0x07, 0xff,
  0xfc, 0xff, 0xff, 0xc0, 0xe0, 0x1f, 0xf8, 0x0f, 0xff, 0xfc, 0xff, 0xff, 0xe0, 0x00, 0x3f, 0xf0,
  0x1f, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0x00, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xfe, 0x00,
  0x00, 0x01, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff, 0xfc, 0xff, 0xff,
  0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7c,
  0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3c, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
};

// 'abakus', 180x180px
const unsigned char logoabakus [] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x33, 0x78, 0x00,
  0x03, 0xc0, 0x1e, 0x00, 0x02, 0xc0, 0x60, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x03, 0xc0, 0x61, 0xce, 0x00, 0x03, 0x80, 0x37, 0x81, 0x8c, 0xe0, 0xe0, 0x0d, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x61, 0xc6, 0x00, 0x03, 0x80,
  0x7f, 0xc3, 0x8d, 0xe0, 0xe0, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x06, 0xc0, 0x7d, 0xc6, 0x00, 0x07, 0x80, 0x7f, 0xc7, 0x07, 0x70, 0xe0, 0x0e, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x3b, 0xc6, 0x00, 0x0d, 0xc0, 0x7f, 0xce,
  0x00, 0x71, 0xe0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc0,
  0x02, 0x8c, 0x00, 0x0d, 0xc0, 0x3f, 0xd8, 0x00, 0x70, 0xa0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0x02, 0x98, 0x00, 0x09, 0xc0, 0x01, 0xf0, 0x00, 0x71,
  0xa0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0x02, 0xcc,
  0x00, 0x18, 0xc0, 0x01, 0xf0, 0x00, 0x70, 0xe0, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x18, 0xe4, 0x06, 0xc6, 0x00, 0x18, 0xcc, 0x01, 0xe0, 0x00, 0x71, 0xc0, 0x23,
  0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x07, 0xc3, 0x00, 0xff,
  0xf8, 0x01, 0xf0, 0x00, 0x61, 0xc0, 0x61, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x0f, 0x90, 0x60, 0x07, 0xc3, 0x1f, 0xb0, 0xe0, 0x03, 0xb8, 0x00, 0x61, 0xc0, 0xc1, 0xc0, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xb0, 0x60, 0x03, 0xc3, 0x1f, 0x20, 0xe0, 0x03,
  0x39, 0xc0, 0xe1, 0x80, 0xbc, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xb0,
  0x70, 0x02, 0xc3, 0xbd, 0x60, 0x60, 0x03, 0x1d, 0xe0, 0x61, 0x81, 0xa6, 0xc0, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x60, 0x3e, 0x03, 0xe3, 0x37, 0xe0, 0x7e, 0x03, 0x0f, 0xe0,
  0x61, 0x93, 0x6e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x3e, 0x03,
  0xc6, 0x18, 0xc0, 0x7e, 0x07, 0x07, 0xc0, 0x63, 0xba, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x07, 0xc0, 0x1e, 0x03, 0xee, 0x0f, 0x80, 0x3e, 0x07, 0x00, 0x00, 0x24, 0xde,
  0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x3f, 0xe0, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x7f, 0xc0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x03, 0x80,
  0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x1f, 0xf8, 0x00, 0x00,
  0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x01,
  0xff, 0xc0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00,
  0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe,
  0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f,
  0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0xff,
  0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00,
  0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00,
  0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00,
  0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00,
  0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff,
  0xff, 0x9f, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xc7, 0xfc, 0xff, 0xe0, 0x00, 0x00, 0x78,
  0xf3, 0xff, 0x3f, 0xf9, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xf9, 0xff,
  0xcf, 0xfc, 0xf1, 0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x8f,
  0xfe, 0x7f, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xcf, 0xfc, 0xf1, 0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff,
  0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xcf, 0xfc,
  0xf1, 0xe0, 0x00, 0x00, 0x7f, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x9f, 0xfe, 0x7f,
  0xff, 0xff, 0xff, 0xf9, 0xff, 0xcf, 0xfc, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf1, 0x02, 0x3f, 0xfc,
  0x40, 0x00, 0x00, 0x01, 0x1f, 0xfe, 0x20, 0x00, 0x00, 0x00, 0x21, 0xff, 0xe2, 0x08, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00,
  0x00, 0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00,
  0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01,
  0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00,
  0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe,
  0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f,
  0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0xff,
  0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x0f, 0xe0, 0x00,
  0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0xe0, 0x00,
  0x00, 0x7f, 0xf0, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x1c, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f,
  0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00,
  0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x0f, 0xf0,
  0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff,
  0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xf8, 0x00, 0x00,
  0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00,
  0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff,
  0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00,
  0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f,
  0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff,
  0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00,
  0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf3, 0xff, 0x3f, 0xfc, 0xff,
  0xff, 0xc7, 0xff, 0x3f, 0xff, 0xff, 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xe0, 0x00,
  0x00, 0x78, 0xf3, 0xff, 0x3f, 0xf9, 0xff, 0xff, 0xe7, 0xff, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xe7,
  0xff, 0xff, 0xff, 0xfc, 0xf1, 0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xe7,
  0xff, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xfc, 0xf1, 0xe0, 0x00, 0x00, 0x78,
  0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xe7, 0xff, 0x3f, 0xff, 0xff, 0xfc, 0xff, 0xe7, 0xff, 0xff,
  0xff, 0xfc, 0xf1, 0xe0, 0x00, 0x00, 0x79, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xc7, 0xff, 0x3f,
  0xff, 0xff, 0xfc, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xfc, 0xf9, 0xe0, 0x00, 0x00, 0x7f, 0xf1, 0xfe,
  0x3f, 0xfc, 0xff, 0xff, 0xcf, 0xff, 0x1f, 0xff, 0xff, 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xf8,
  0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc,
  0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff,
  0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00,
  0x0f, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00,
  0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xff,
  0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x3f, 0xf8, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00,
  0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x0f,
  0xf0, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0xff,
  0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00,
  0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00,
  0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f,
  0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00,
  0x01, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00,
  0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00,
  0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x07, 0xfe,
  0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00,
  0x3f, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00,
  0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf8,
  0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f,
  0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00,
  0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x0f,
  0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf1, 0xff, 0xff,
  0xfe, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xc7, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xfc, 0x7f, 0xf8, 0xff,
  0xe0, 0x00, 0x00, 0x7d, 0xf3, 0xff, 0xff, 0xff, 0x3f, 0xf9, 0xff, 0xff, 0xff, 0xe7, 0xff, 0x3f,
  0xff, 0xff, 0x9f, 0xfc, 0xff, 0xfc, 0xfb, 0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff, 0xff, 0xff, 0x3f,
  0xf9, 0xff, 0xff, 0xff, 0xe7, 0xff, 0x3f, 0xff, 0xff, 0x9f, 0xfc, 0xff, 0xfc, 0xf1, 0xe0, 0x00,
  0x00, 0x78, 0xf3, 0xff, 0xff, 0xff, 0x3f, 0xf9, 0xff, 0xff, 0xff, 0xe7, 0xff, 0x3f, 0xff, 0xff,
  0x9f, 0xfc, 0xff, 0xfc, 0xf1, 0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff, 0xff, 0xff, 0x3f, 0xf9, 0xff,
  0xff, 0xff, 0xe7, 0xff, 0x3f, 0xff, 0xff, 0x9f, 0xfc, 0xff, 0xfc, 0xf1, 0xe0, 0x00, 0x00, 0x7f,
  0xf3, 0xff, 0xff, 0xfe, 0x3f, 0xf9, 0xff, 0xff, 0xff, 0xc7, 0xff, 0x3f, 0xff, 0xff, 0x1f, 0xfc,
  0xff, 0xfc, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00,
  0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00,
  0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00,
  0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff,
  0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00,
  0x7f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00,
  0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf8,
  0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x1f,
  0xfc, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00,
  0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x01,
  0xf8, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
  0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00,
  0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00,
  0x03, 0xe0, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f,
  0xf0, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x1f, 0xf8,
  0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00,
  0x3f, 0xf8, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
  0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00,
  0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc,
  0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00,
  0x00, 0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f,
  0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf1,
  0x86, 0x3f, 0xfc, 0x40, 0x00, 0x07, 0x3f, 0xfc, 0x60, 0x01, 0x8f, 0xfe, 0x30, 0x00, 0x00, 0x00,
  0x18, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff,
  0xff, 0x8f, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff, 0x3f,
  0xf8, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xcf, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xf1,
  0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xcf,
  0xfe, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xe0, 0x00, 0x00, 0x78, 0xf3, 0xff, 0x3f, 0xf8, 0xff,
  0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xcf, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xf1, 0xe0, 0x00,
  0x00, 0x7f, 0xf3, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x8f, 0xfe, 0x7f,
  0xff, 0xff, 0xff, 0xfc, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00,
  0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f,
  0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc,
  0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00,
  0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
  0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00,
  0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xfc,
  0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x0f, 0xfe,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x1f, 0xf8, 0x00, 0x00,
  0x00, 0x1f, 0xf8, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x07,
  0xe0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
  0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
  0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00,
  0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f,
  0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
  0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00,
  0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xf0,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

// ST7789 TFT module connections, can be anything
// Some pins are static, can not be changed - look inside the library for the pin connection
#define TFT_CS     6  // define chip select pin
#define TFT_DC     5  // define data/command pin
#define TFT_RST    8  // define reset pin, or set to -1 and connect to Arduino RESET pin

//Analog read-out of temperature with variables for better calculating
int temp_pin_1 = A2;
int temp_pin_2 = A0;
int temp_pin_3 = A1;
float temp_val = 0; // variable to store the value coming from the sensor
int temperature_const = 15;
int difference_temp = 0;

// Initialize Adafruit ST7789 TFT library
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

//Variables for pulse counting, RMP
unsigned long previousRPMMillis;
unsigned long previousMillis;
unsigned long RPM_calculated = 1000;

unsigned long interval = 1000;
byte pwmValue = 255;
byte pwmInterval = 5;
const byte pwmMax = 255;
const byte pwmMin = 0;

const int reedPin = 2; //read-out pin for RMP
//const int sparePin = 3; //turn-off pin for RMP
const int fanPin = 9;  //Use PIN9 with PWM 25kHz
const int pot_Pin = A6;    // select the input pin for the potentiometer
float pot_Val = 0;
float pwmValue_f = 0;


//Variables for pulse counting, RMP
volatile unsigned long pulses = 0;
unsigned long lastRPMmillis = 0;


void countPulse() {
  // just count each pulse we see
  // ISRs should be short, not like
  // these comments, which are long.
  pulses++;
}

//configure Timer 1 (pins 9,10) to output 25kHz PWM
//both pins are unavailable, only for PWM FAN
void setupTimer1() {
  //Set PWM frequency to about 25khz on pins 9,10 (timer 1 mode 10, no prescale, count to 320)
  TCCR1A = (1 << COM1A1) | (1 << COM1B1) | (1 << WGM11);
  TCCR1B = (1 << CS10) | (1 << WGM13);
  ICR1 = 320;
  OCR1A = 0;
  OCR1B = 0;
}

//equivalent of analogWrite on pin 9
void setPWM1A(float f) {
  f = f < 0 ? 0 : f > 1 ? 1 : f;
  OCR1A = (uint16_t)(320 * f);
}

void setup() {
  
  Serial.begin(9600); //fire up the serial watch :)
  pinMode(reedPin, INPUT_PULLUP); //RPM pin
  //pinMode(sparePin, OUTPUT); //RPM pin
  //digitalWrite(sparePin,LOW);
  attachInterrupt(digitalPinToInterrupt(reedPin), countPulse, FALLING);

  pinMode(fanPin, OUTPUT); // probably PWM
  setupTimer1();
  setPWM1A(0.8f); //set duty to 80% on pin 3, just random value

  // if the display has CS pin try with SPI_MODE0
  tft.init(240, 240, SPI_MODE2);    // Init ST7789 display 240x240 pixel
  // if the screen is flipped, remove this command
  tft.setRotation(2);
  tft.fillScreen(ST77XX_WHITE);

  //startup, draw Abakus logo an wait, than fill with wait
  tft.drawBitmap(30, 30,  logoabakus, 180, 180, ST77XX_BLACK, ST77XX_WHITE);
  delay(3000);
  tft.fillScreen(ST77XX_WHITE);

  //progress bar, START
  tft.setTextColor(ST77XX_BLUE, ST77XX_WHITE);
  tft.setTextWrap(true);
  tft.setTextSize(2);

  tft.drawRoundRect(35 , 105, 170, 30, 10, ST77XX_BLUE);

  tft.setCursor (70, 80);
  tft.print("Loading...");

  for (int i = 0; i <= 160; i++) {
    tft.drawFastVLine(40 + i, 110, 20, ST77XX_RED);
    tft.setCursor (80, 150);
    tft.print(i * 0.625);
    tft.print("%");
    delay(30);
  }

  tft.setTextColor(ST77XX_BLUE, ST77XX_WHITE);
  tft.setCursor (80, 175);
  tft.print("Status:");
  tft.setTextColor(ST77XX_GREEN, ST77XX_WHITE);
  tft.print("OK");
  tft.setTextColor(ST77XX_BLUE, ST77XX_WHITE);
  delay(100);
  //progress bar, END
  
  tft.fillScreen(ST77XX_WHITE);
  //startup

  tft.drawRoundRect(10, 10, 220, 220, 10, ST77XX_BLUE);
  //tft.setFont(&FreeMonoBoldOblique12pt7b);

  //thermometer, draw by lines
  tft.drawCircle(38, 90, 15, ST77XX_BLUE);
  tft.drawRoundRect(30, 25, 16, 55, 5, ST77XX_BLUE);
  tft.fillCircle(38, 90, 14, ST77XX_WHITE);
  tft.fillRect(31, 35, 14, 50, ST77XX_WHITE);
  tft.fillCircle(38, 90, 13.5, ST77XX_RED);
  tft.fillCircle(43, 85, 3, ST77XX_WHITE);
  tft.fillRect(32, 65, 12, 17, ST77XX_RED);
  //animation of the cursor
  for (int i = 0; i <= 4; i++) {
    tft.drawFastHLine(50, 30 + (10 * i), 10, ST77XX_BLUE);
    tft.drawFastHLine(50, 35 + (10 * i), 5, ST77XX_BLUE);
  }

  tft.fillTriangle(65, 65, 70, 60, 70, 70, ST77XX_BLACK);
}

//calculate RPM function
unsigned long calculateRPM() {
  unsigned long RPM;
  noInterrupts();
  float elapsedMS = (millis() - lastRPMmillis) / 1000.0;
  unsigned long revolutions = pulses / 2;
  float revPerMS = revolutions / elapsedMS;
  RPM = revPerMS * 60.0;
  lastRPMmillis = millis();
  pulses = 0;
  interrupts();
 /* Serial.print(F("elpasedMS = ")); Serial.println(elapsedMS);
    Serial.print(F("revolutions = ")); Serial.println(revolutions);
    Serial.print(F("revPerMS = ")); Serial.println(revPerMS); */
  return RPM;
}

void loop() {
  handleSerial();

  if (millis() - previousMillis > interval) {
    Serial.print ("Potentiometer: ");
    Serial.print(pot_Val);
    Serial.println("");
    Serial.print("RPM=");
    RPM_calculated = calculateRPM();
    Serial.print(RPM_calculated);
    Serial.print(F(" @ PWM="));
    Serial.println(pwmValue);
    previousMillis = millis();
  }
  
  temp_val = read_potentiometer(pot_Pin); //950
  pot_Val =  temp_val;  //302
  if (pot_Val < 0) {
    pot_Val = 0;
  }
  pot_Val = pot_Val * 0.25; // transfer to 0-255 range
  if (pot_Val < 3) {
    pot_Val = 0;
  }
  if (pot_Val > 253) {
    pot_Val = 255;
  }
  pwmValue = pot_Val; //asign the value from the potentiomer
  //analogWrite(fanPin, pwmValue); //set the PWM
  pwmValue_f = float(pwmValue) / 255;
  Serial.println("PWM real: ");
  Serial.print(pwmValue_f);
  setPWM1A(pwmValue_f); //set duty to custom on pin 9


  tft.setTextColor(ST77XX_BLUE, ST77XX_WHITE);
  tft.setTextWrap(true);
  tft.setTextSize(2);

  // tft.drawBitmap(25, 25,  thermometer_icon, 24, 36, ST77XX_BLACK);
  tft.setCursor(90, 35);
  temp_val = read_temp(temp_pin_1) - 1.6;
  tft.print(temp_val);
  tft.print(char(247));
  tft.print("C");

  //tft.fillCircle(150, 60, 10, ST77XX_WHITE);
  //tft.drawCircle(150, 60, 6, ST77XX_BLUE);

  tft.setCursor(90, 55);
  temp_val = read_temp(temp_pin_2) - 1;
  tft.print(temp_val);
  tft.print(char(247));
  tft.print("C");
  tft.setCursor(90, 75);
  temp_val = read_temp(temp_pin_3) - 1.7;
  tft.print(temp_val);
  tft.print(char(247));
  tft.print("C");

  //Thermometer animation
  for (int j = 0; j <= difference_temp + 1; j++ ) {
    tft.drawFastHLine(32, 65 - j, 12, ST77XX_WHITE);
  }

  for (int i = 0; i <= ((int)temp_val - temperature_const); i++ ) {
    tft.drawFastHLine(32, 65 - i, 12, ST77XX_RED);
  }


  tft.fillTriangle(65, 65 - difference_temp, 70, 60 - difference_temp, 70, 70 - difference_temp, ST77XX_WHITE);
  tft.fillTriangle(65, 65, 70, 60, 70, 70, ST77XX_WHITE);
  tft.fillTriangle(65, 65 - ((int)temp_val - temperature_const), 70, 60 - ((int)temp_val - temperature_const), 70, 70 - ((int)temp_val - temperature_const), ST77XX_BLACK);
  difference_temp = ((int)temp_val - temperature_const);
  if (difference_temp > 25) {
    difference_temp = 25;
  }

  //draw fan
  tft.drawBitmap(20, 150,  fanfan, 70, 70, ST77XX_BLACK, ST77XX_WHITE);
  tft.drawBitmap(20, 150,  fan_propeler1_7 , 70, 70, ST77XX_BLACK, ST77XX_WHITE);
  tft.drawBitmap(20, 150,  fan_15propeler1_15 , 70, 70, ST77XX_BLACK, ST77XX_WHITE);
  tft.drawBitmap(20, 150,  fan_propeler1_22 , 70, 70, ST77XX_BLACK, ST77XX_WHITE);
  tft.drawBitmap(20, 150,  fan_30propeler1_30 , 70, 70, ST77XX_BLACK, ST77XX_WHITE);
  tft.drawBitmap(20, 150,  fan_propeler1_37 , 70, 70, ST77XX_BLACK, ST77XX_WHITE);

  tft.setTextColor(ST77XX_BLUE, ST77XX_WHITE);
  tft.setTextWrap(true);
  tft.setTextSize(1);
  tft.setCursor(130, 210);
  tft.print("0%");

  if (pot_Val >= 0 && pot_Val <= 50) {
    tft.fillRect(100, 210, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 195, 25, 10, ST77XX_WHITE);
    tft.fillRect(100, 180, 25, 10, ST77XX_WHITE);
    tft.fillRect(100, 165, 25, 10, ST77XX_WHITE);
    tft.fillRect(100, 150, 25, 10, ST77XX_WHITE);
    tft.setTextColor(ST77XX_WHITE, ST77XX_WHITE);
    tft.setCursor(130, 150);
    tft.print("100%");
  } else if (pot_Val > 50 && pot_Val <= 100) {
    tft.fillRect(100, 210, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 195, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 180, 25, 10, ST77XX_WHITE);
    tft.fillRect(100, 165, 25, 10, ST77XX_WHITE);
    tft.fillRect(100, 150, 25, 10, ST77XX_WHITE);
    tft.setTextColor(ST77XX_WHITE, ST77XX_WHITE);
    tft.setCursor(130, 150);
    tft.print("100%");
  } else if (pot_Val > 100 && pot_Val <= 150) {
    tft.fillRect(100, 210, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 195, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 180, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 165, 25, 10, ST77XX_WHITE);
    tft.fillRect(100, 150, 25, 10, ST77XX_WHITE);
    tft.setTextColor(ST77XX_WHITE, ST77XX_WHITE);
    tft.setCursor(130, 150);
    tft.print("100%");
  } else if (pot_Val > 150 && pot_Val <= 200) {
    tft.fillRect(100, 210, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 195, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 180, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 165, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 150, 25, 10, ST77XX_WHITE);
    tft.setTextColor(ST77XX_WHITE, ST77XX_WHITE);
    tft.setCursor(130, 150);
    tft.print("100%");
  } else if (pot_Val > 200 && pot_Val <= 255) {
    tft.fillRect(100, 210, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 195, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 180, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 165, 25, 10, ST77XX_BLACK);
    tft.fillRect(100, 150, 25, 10, ST77XX_BLACK);
    tft.setTextColor(ST77XX_BLACK, ST77XX_WHITE);
    tft.setCursor(130, 150);
    tft.print("100%");
  }


  tft.setTextColor(ST77XX_BLUE, ST77XX_WHITE);
  tft.setTextSize(2);
  //  tft.drawRGBBitmap(15, 160, NF_P14, 50, 52);
  tft.setCursor(130, 165);
  tft.print("RPM:");
 //RPM_calculated = constrain(RPM_calculated, 0, 3000);
 RPM_calculated = map((int)pot_Val,0,255,0,1500);
  tft.print(RPM_calculated);
  if ((RPM_calculated < 1000) && (RPM_calculated > 100))
  {
    tft.fillRect(213, 163, 16, 20, ST77XX_WHITE);
  } else if ((RPM_calculated < 100) && (RPM_calculated > 10)) {
    tft.fillRect(199, 163, 25, 20, ST77XX_WHITE);
  } else if (RPM_calculated < 10) {
    tft.fillRect(189, 163, 25, 20, ST77XX_WHITE);
  }

  tft.setCursor(130, 190);
  tft.print("PWM:");
  if ((int)pot_Val < 100)
  {
    tft.fillRect(190, 188, 30, 20, ST77XX_WHITE);
  }
  tft.print((int)pot_Val);

}

void handleSerial() {
  boolean printValue = false;
  while (Serial.available()) {
    switch (Serial.read()) {
      case '+':
        pwmValue = pwmValue + pwmInterval;
        printValue = true;
        break;

      case '-':
        pwmValue = pwmValue - pwmInterval;
        printValue = true;
        break;

      case '!':
        pwmValue = pwmMax;
        printValue = true;
        break;

      case '=':
        pwmValue = 125;
        printValue = true;
        break;

      case '0':
      case '@':
        pwmValue = pwmMin;
        printValue = true;
        break;

      case '?':
        Serial.println(F("+ Increase"));
        Serial.println(F("- Decrease"));
        Serial.print(F("! PWM to ")); Serial.println(pwmMax);
        Serial.print(F("@ PWM to ")); Serial.println(pwmMin);
        Serial.println(F("= PWM to 125"));
        printValue = true;
        break;
    }
  }
  if (printValue) {
    Serial.print(F("Current PWM = "));
    Serial.println(pwmValue);
    Serial.flush();
  }
}

float read_temp(int pin) { //function to average the read-out of the thermometer
  float temperature = 0;
  float average = 0;
  float cel = 0;

  for (int i = 0; i <= 9; i++) {
    temperature = analogRead(pin);
    delay(10);
    temperature = analogRead(pin);
    float mv = ( temperature / 1024.0) * 5000;
    cel = mv / 10;
    average = average + cel;
  }

  cel = average / 10;
  return cel;
}

float read_potentiometer(int pin) { //function to average the read-out of the potentiometer
  float potentiometer = 0;
  float average = 0;
  float cel = 0;

  for (int i = 0; i <= 4; i++) {
    potentiometer = analogRead(pin);
    delay(10);
    potentiometer = analogRead(pin);
    average = average + potentiometer;
  }

  cel = average / 5;
  return cel;
}

void drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) {

  int16_t i, j, byteWidth = (w + 7) / 8;
  uint8_t byte;

  for (j = 0; j < h; j++) {
    for (i = 0; i < w; i++) {
      if (i & 7) byte <<= 1;
      else      byte   = pgm_read_byte(bitmap + j * byteWidth + i / 8);
      if (byte & 0x80) tft.drawPixel(x + i, y + j, color);
    }
  }
}

Okay, you are really going to have to show us that. Sometimes when people claim to have followed a tutorial or build exactly, it's not quite the case...

Sometimes someone has forgotten to do some really simple thing that Bald Engineer or someone like that takes for granted, that everyone knows.

Also, did you write the code you posted, or is that directly from the tutorial/build?

FYI, it is good form to put font declarations in a separate file.

Another thought - have you written and tested sketches that only run the fan, no display or other stuff to possibly interfere?

Okay, you are really going to have to show us that. Sometimes when people claim to have followed a tutorial or build exactly, it's not quite the case...

Well, I got your point and agree. It is true that at first when I have tried the guide from Bald Engineer the circuit wasnt working, just messed the capacitors and instead of nf used uf, :innocent: . However, after this the circuit worked for the 3 PIN fan, as described in the tutorial. I have used that time Nano Every and since I had issues to change the registers on this to do the 4 PIN PWM version, I have reverted to Nano classic. However, at this point I have tested everything before I have changed the code and add the register changes for the 25 kHz PWM. Therefore the circuit should be untouched from the time it was working for the 3 PIN FAN.

Also, did you write the code you posted, or is that directly from the tutorial/build?

I have used the part from the tutorial. Wasnt changing there much, only add a variable to store the RPM, I do not argue if it wasnt a good move, however, again the code was working for the 3 PIN version before I have used the second guide from Federico to adjust the PWM frequency.

FYI, it is good form to put font declarations in a separate file.

Agree, still learning though.

Another thought - have you written and tested sketches that only run the fan, no display or other stuff to possibly interfere?

No, I was thinking about this as well but since it is on a shelf inside a PMMA cover, the changes are not so convenient :smiley: . It is quite funny to see since I need a chair etc.. :grinning: Anyway, open to test this as well.

What I am really confuse of is the fact that at full speed the RPM is correct. Only if the regulation through the PIN 9 kicks in the RPM goes strange - not random though. Seems like mapping this to 0-1500 would return the RPM right, only not at full speed.

One idea though. If you look at Bald Engineer schematics, the part for the PWM for the 3 PIN connector, I kept this part on the circuit, just cut out the wire coming to the Vin to the FAN and connected to this pin 12V directly. This part is not connected to the Arudino pin any more, but still to 12V - see the modified schematics below. I do not see much reasons why this should do anything but mentioned it anyway.

schema

Also, could the PWM frequency affect this?

Tomas

I meant, in software only. I didn't necessarily mean disconnecting all the hardware. You could monitor the program via serial.

Hi,

so, it is the same drill with the chair but I have tried it today. Disabling the display and most of the stuff will not do any change unfortunately. However, I have tried only the RPM part from Bald engineer guide, this was working and thus I have tried to do more tests and the results are as follows:

  • The RPM works if I do not regulate the PWM (yes, I was slowing down the FAN with my fingers to achieve lower revolutions :slight_smile: ). This applies only for the RPM part from Bald engineers guide. I guess the circuit could be right in this case then.
  • If I changed the code only to the one below, the RPM was wrong again, however, if I have disabled the PIN9 as output, it was working
//configure Timer 1 (pins 9,10) to output 25kHz PWM
void setupTimer1(){
    //Set PWM frequency to about 25khz on pins 9,10 (timer 1 mode 10, no prescale, count to 320)
    TCCR1A = (1 << COM1A1) | (1 << COM1B1) | (1 << WGM11);
    TCCR1B = (1 << CS10) | (1 << WGM13);
    ICR1 = 320;
    OCR1A = 0;
    OCR1B = 0;
}

//equivalent of analogWrite on pin 9
void setPWM1A(float f){
    f=f<0?0:f>1?1:f;
    OCR1A = (uint16_t)(320*f);
}


unsigned long previousRPMMillis;
unsigned long previousMillis;
float RPM;
 
unsigned long interval = 1000;
 
const int reedPin = 2;

volatile unsigned long pulses=0;
unsigned long lastRPMmillis = 0;
 
 
void countPulse() {
  // just count each pulse we see
  // ISRs should be short, not like
  // these comments, which are long.
  pulses++;
}
 

void setup(){
    //enable outputs for Timer 1
    //pinMode(9,OUTPUT); //1A
    setupTimer1();
    //enable outputs for Timer 2
    //setPWM1A(0.5f); //set duty to 50% on pin 9
  Serial.begin(9600);
  pinMode(reedPin,INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(reedPin), countPulse, FALLING);
}

unsigned long calculateRPM() {
  unsigned long RPM;
  noInterrupts();
  float elapsedMS = (millis() - lastRPMmillis)/1000.0;
  unsigned long revolutions = pulses/2;
  float revPerMS = revolutions / elapsedMS;
  RPM = revPerMS * 60.0;
  lastRPMmillis = millis();
  pulses=0;
  interrupts();
  Serial.print(F("elpasedMS = ")); Serial.println(elapsedMS);
  Serial.print(F("revolutions = ")); Serial.println(revolutions);
  Serial.print(F("revPerMS = ")); Serial.println(revPerMS); 
  return RPM;
}

void loop(){

 if (millis() - previousMillis > interval) {
    Serial.print("RPM=");
    Serial.println(calculateRPM());
    previousMillis = millis();  
  }
  
}

So, all is good until I try to regulate the FAN and lower the PWM. According to the noctua specification, it should accept 21-28kHz and apparently the regulation works, why it do a mess with the RPM, that is very strange. Moreover, the same happens on a different fan from a different brand so it is not brand related.

The connection to the PWM fan pin is made directly from the PIN 9, no pull resistor in between, however, does this could make any difference?

I am quite lost at this moment :frowning:

thx, Tomas

Just an update. I have tried different approaches for the PWM and RPM. Always when I change the PWM, the RPM reading is wrong. Therefore the PWM is messing with the RPM readings, somehow, don't know how to be honest.

Right now I am not sure if it could be solved by different wiring or maybe trying to map the "distorted" RPM to the PWM value

Hi,
Can you give us a proper circuit diagram, even hand draw it?

Include:
Power supply.
Fan.
All interconnections.
Label ALL components and pins used.
Include ALL gnd connections.
How are you controlling speed, what is the speed reference input?

Sorry but he diagram in post #3 tells us very little of your project.

Tom... :smiley: :+1: :coffee: :australia:

1 Like

Damn, I was afraid someone will ask this obvious question :slight_smile:
Yes, I will do it, still remember the connection, will post it later today. Hopefully there would be some answer.

regards, Tomas

ok, the picture of the connection and the "circuit" below.
If the horrible sketch wouldnt be enough, let me know, I will redraw it.
The FAN connection is at the top left, inside the terminal. I use a 12V source for the FAN and a down step to 5,1V for the Arduino.

PS: Some of the parts on the board are not connected, I have tried them but since they wasn't working I kept them unconnected.


Thanks, it does make it easier to understand. But, I have trouble finding a fan in the schematic.

sorry for that
As I have mentioned, if the information/way of the schematic is not enough, let me know.

The RPM pin of the fan doesn't seem to "go anywhere". Just a resistor to 5V and a cap to ground.

As poorly indicated in my schematic, the "terminal" where the 5V connects to the 1k resistor is connected to the RPM pin 2. The dashed circle around the terminal with a note "connected".

Hi,

If pin 2 is connected to 5V, how do you get the tacho volts to pin2?

Tom... :smiley: :+1: :coffee: :australia:

Hi,
Don't you have it connected like this?
What value capacitor is that?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Yes, you are correct, sorry for the mistake.
The capacitor is 104nf, was checking it right now just to make sure.

You are convoluting a capacitance value, and a capacitor component code. a cap marked "104" is a 0.1uf cap.

When we get past that, it seems that there are still a lot of unanswered questions... for example, it's really confusing around "T3". If you are going to create non-standard components, please at least use them consistently.

Why not just scrap the diagram and start from scratch? There will be too much back and forth trying to understand it this way. Clearly label all the parts.

You could have drawn a simple line from pin 2 to the PWM pin, by going to the left of the Processor block. You didn't have to use a dotted line. That kind of thing just confuses someone who reads schematics a lot.

Thank you for your reply.

Yes, you are right, is is a mess made in a rush... should keep more attention next time to it. However, I have some news. I had some time today and tried to reduce the 100nF cap down to something else. Removing it made the readings more reasonable and replacing it for a 33pF - the only one I have found, solved the issue and now the RPM is showing reasonable values :slight_smile:

If you think it would be beneficial to do the "right" schematics and probably help someone else that would be searching for the solution, I will do it. If you know some online service for drawing these stuff, recommend me something, I have tried several today, a few of them were good ones but before finishing the schematics, they have locked my account with - your trial period is over :slight_smile: and thus couldnt finish it.

regards, Tomas

EasyEDA is free, online, and quite easy to use

thx, was working like a charm.