0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
I made a program to simulate a crankshaft (60-2) and camshaft (arbitrary profile, 1/2 speed of crankshaft) position sensor of an engine. It takes up too much global variable space, plenty of sketch space available though. The general strategy is to have a for loop that goes from 0:719 degrees and looks at two arrays that are either 0 or 1 that I copy paste from excel/.csv file. It works if I give the camshaft a different arbitrary profile and reduce the loop to 360 degrees (0:359) but the resolution isn't high enough doing it this way to reproduce the 60-2 crankshaft signal.Any suggestions? I'm an arduino novice and am sure I'm missing something obvious.Code for the 720 degree code attached, thanks!