Digital Tachometer for record player (LCD display)

Hi, I am new to Arduinuo and know nothing (yet) about creating sketches etc. I have downloaded tacho.txt, changed the file to .ino and, from the library, downloaded liquid crystal _PCF8574. When I verify the sketch I receive the message "stray '\357' in program". Can someone please tell me what this means and what needs doing to correct the error.

Many thanks,

Fred.
 
Binary 11101111 is 239 decimal; look for a "union" character (∩) in the text.

One other possibility: Check that line #25 is written exactly as below:

byte DISC[8]={B00000,B01110,B11111,B11011,B11111,B01110,B00000,B00000}; //* LCD custom char

If you copied the sketch from a code window here on DIYAudio, it randomly omits characters. You should always copy the sketch as the attached .txt file.
 
Mark, I don't have/use any text editor at all. In fact I really wouldn't know what to do with one!!

Bill (?) thank you for contributing. I have looked through the Tach.ino code I downloaded and cannot see a union character anywhere in the text. Also I have checked the code you mention on line #25 and the code appears exactly as you have written. The sketch I copied was from post #315, not from a code window. Not sure, therefore, what has gone wrong.
 
Member
Joined 2014
Paid Member
Compile error

I think I'm using the latest sketch but I get the following compile error, but am not sure what to change. Maybe I have the incorrect "LiquidCrystal_PCF8574" library?

error:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\whirs\Documents\Arduino\Tach_Jan_8_2019\Tach_Jan_8_2019.ino: In function 'void setup()':

Tach_Jan_8_2019:47:24: error: no matching function for call to 'LiquidCrystal_PCF8574::createChar(int, byte [8])'

lcd.createChar(0,DISC);

^

In file included from C:\Users\whirs\Documents\Arduino\Tach_Jan_8_2019\Tach_Jan_8_2019.ino:1:0:

C:\Users\whirs\Documents\Arduino\libraries\LiquidCrystal_PCF8574-1.2.0\src/LiquidCrystal_PCF8574.h:60:8: note: candidate: void LiquidCrystal_PCF8574::createChar(int, int*)

void createChar(int, int[]);

^

C:\Users\whirs\Documents\Arduino\libraries\LiquidCrystal_PCF8574-1.2.0\src/LiquidCrystal_PCF8574.h:60:8: note: no known conversion for argument 2 from 'byte [8] {aka unsigned char [8]}' to 'int*'

exit status 1
no matching function for call to 'LiquidCrystal_PCF8574::createChar(int, byte [8])'
 
Member
Joined 2014
Paid Member
It would appear that I needed to use the previous release of the library. I made that change and now I'm at least getting the correct text on the screen
I think I'm using the latest sketch but I get the following compile error, but am not sure what to change. Maybe I have the incorrect "LiquidCrystal_PCF8574" library?

error:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\whirs\Documents\Arduino\Tach_Jan_8_2019\Tach_Jan_8_2019.ino: In function 'void setup()':

Tach_Jan_8_2019:47:24: error: no matching function for call to 'LiquidCrystal_PCF8574::createChar(int, byte [8])'

lcd.createChar(0,DISC);

^

In file included from C:\Users\whirs\Documents\Arduino\Tach_Jan_8_2019\Tach_Jan_8_2019.ino:1:0:

C:\Users\whirs\Documents\Arduino\libraries\LiquidCrystal_PCF8574-1.2.0\src/LiquidCrystal_PCF8574.h:60:8: note: candidate: void LiquidCrystal_PCF8574::createChar(int, int*)

void createChar(int, int[]);

^

C:\Users\whirs\Documents\Arduino\libraries\LiquidCrystal_PCF8574-1.2.0\src/LiquidCrystal_PCF8574.h:60:8: note: no known conversion for argument 2 from 'byte [8] {aka unsigned char [8]}' to 'int*'

exit status 1
no matching function for call to 'LiquidCrystal_PCF8574::createChar(int, byte [8])'
 
RTC

It is already quite accurate but I must still ask the question, would an RTC increase the precision of this tachometer?
This is my OLED version
LP12-to-fast-to-be-true-1024x530.jpg

This LP12 was actually running to fast, now adjusted.
DIY LP Turntable tachometer |
 
By 'RTC' do you mean Real Time Clock?

The accuracy is affected by the actual operating frequency of the crystal on the Arduino board. It is not adjustable, thus the CALIBRATE variable in the sketch that should be set to the frequency at output digital2 x 120. It may be prone to drift with temp, but as the room temp probably doesn't vary much, it should be negligible.
 
By 'RTC' do you mean Real Time Clock?

The accuracy is affected by the actual operating frequency of the crystal on the Arduino board. It is not adjustable, thus the CALIBRATE variable in the sketch that should be set to the frequency at output digital2 x 120. It may be prone to drift with temp, but as the room temp probably doesn't vary much, it should be negligible.
Tnx, That makes life a bit easier ;)
 
This project was fun I went for a slight modification to be able to use an OLED
The graphics has been simplified to only show value or dashes depending on run status. I have made a writeup that is easy to follow (I hope!) so that most people can land the project. With a Arduino Nano and an 128x32 OLED the unit can be housed inside a matchbox sized housing.
Sketch and hook up schematics can be found here ->
DIY LP Turntable tachometer |

/Stefan
 
Yes I removed some functions that I found no need for.
The code view I posted might be a bitt different to the actual code depending of how the web browser reads it.
There is a zip download for the actual Arduino sketch and that one .
However their might be changed in the near future as I still are tampering with it ;)

Webpage updated for better code view ;)