Commit a064c813 authored by thcl's avatar thcl
Browse files

1-15 testing print speed

parent 12f1254a
{
"terminal.integrated.env.windows": {
"PATH": "C:\\Users\\Matt\\.platformio\\penv\\Scripts;C:\\Users\\Matt\\.platformio\\penv;C:\\Program Files\\Dell\\DW WLAN Card;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;c:\\Program Files\\WIDCOMM\\Bluetooth Software\\;c:\\Program Files\\WIDCOMM\\Bluetooth Software\\syswow64;C:\\Users\\Matt\\.dnx\\bin;C:\\Program Files\\Microsoft DNX\\Dnvm\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\Xoreax\\IncrediBuild;C:\\Program Files\\MATLAB\\R2017b\\runtime\\win64;C:\\Program Files\\MATLAB\\R2017b\\bin;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files (x86)\\Microsoft VS Code\\bin;C:\\Users\\Matt\\Anaconda3;C:\\Users\\Matt\\Anaconda3\\Library\\mingw-w64\\bin;C:\\Users\\Matt\\Anaconda3\\Library\\usr\\bin;C:\\Users\\Matt\\Anaconda3\\Library\\bin;C:\\Users\\Matt\\Anaconda3\\Scripts;C:\\Users\\Matt\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Microsoft VS Code\\bin;C:\\Users\\Matt\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\Dell\\DW WLAN Card;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;c:\\Program Files\\WIDCOMM\\Bluetooth Software\\;c:\\Program Files\\WIDCOMM\\Bluetooth Software\\syswow64;C:\\Users\\Matt\\.dnx\\bin;C:\\Program Files\\Microsoft DNX\\Dnvm\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\Xoreax\\IncrediBuild;C:\\Program Files\\MATLAB\\R2017b\\runtime\\win64;C:\\Program Files\\MATLAB\\R2017b\\bin;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files (x86)\\Microsoft VS Code\\bin;C:\\Users\\Matt\\Anaconda3;C:\\Users\\Matt\\Anaconda3\\Library\\mingw-w64\\bin;C:\\Users\\Matt\\Anaconda3\\Library\\usr\\bin;C:\\Users\\Matt\\Anaconda3\\Library\\bin;C:\\Users\\Matt\\Anaconda3\\Scripts;C:\\Users\\Matt\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Microsoft VS Code\\bin;C:\\Users\\Matt\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
"PATH": "C:\\Users\\zatar\\.platformio\\penv\\Scripts;C:\\Users\\zatar\\.platformio\\penv;C:\\ProgramData\\Anaconda3;C:\\ProgramData\\Anaconda3\\Library\\mingw-w64\\bin;C:\\ProgramData\\Anaconda3\\Library\\usr\\bin;C:\\ProgramData\\Anaconda3\\Library\\bin;C:\\ProgramData\\Anaconda3\\Scripts;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Users\\zatar\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\zatar\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\zatar\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\zatar\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;c:\\Cygwin64\\bin;;C:\\ProgramData\\Anaconda3;C:\\ProgramData\\Anaconda3\\Library\\mingw-w64\\bin;C:\\ProgramData\\Anaconda3\\Library\\usr\\bin;C:\\ProgramData\\Anaconda3\\Library\\bin;C:\\ProgramData\\Anaconda3\\Scripts;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Users\\zatar\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\zatar\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\zatar\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\zatar\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;c:\\Cygwin64\\bin;",
"PLATFORMIO_CALLER": "vscode"
}
}
\ No newline at end of file
......@@ -38,6 +38,7 @@ int calibrate_encoder(void);
int get_raw_wheel_position_ticks(void);
int get_elec_rev_position_ticks(int mechanical_position);
int get_phase_number(int elec_position);
void print_speed_ISR(void);
......@@ -81,7 +82,10 @@ void print_speed_ISR(void){
int count_diff = raw_count - last_count;
double revolution = (double)count_diff / (double)total_encoder_ticks;
Serial.print("Speed: ");
Serial.print(revolution, 2);
Serial.println(" rps");
last_count = raw_count;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment