Skip to content

Instantly share code, notes, and snippets.

View victorypoint's full-sized avatar

Al Udell victorypoint

View GitHub Profile
@victorypoint
victorypoint / ifit2-metrics-ocr.py
Last active November 20, 2024 18:19
Retrieve iFit2 Workout Metrics From Screen via OCR
# iFit2-Metrics-OCR - 'Retrieve iFit2 Workout Metrics via OCR
# Author: Al Udell
# Revised: November 20, 2024
# --- functions ---
# Validate RPM values function
def validate_rpm(value):
try:
if '/' in value:
@victorypoint
victorypoint / zwift-workout.py
Created November 7, 2024 00:08
Take Zwift screenshot, crop workout instructions, and OCR workout instructions to extract speed and incline
# Zwift-Workout.py - Take Zwift screenshot, crop workout instructions, and OCR workout instructions to extract speed and incline
# Author: Al Udell
# Revised: November 6, 2024
# imports
import cv2
import numpy as np
import re
from PIL import Image, ImageGrab
import requests
@victorypoint
victorypoint / ifit2-zwift-workout.vbs
Created November 7, 2024 00:01
Zwift workouts auto-incline and auto-speed control of treadmill via ADB and OCR
' iFit2-Zwift-Workout - Zwift workouts auto-incline and auto-speed control of treadmill via ADB and OCR
' Author: Al Udell
' Revised: November 6, 2024
' To debug - enable wscript.echo and run by cscript in command line
' On Error Resume Next
' Display startup message
createobject("wscript.shell").popup "Ensure treadmill is in manual workout mode with onscreen speed and incline controls visible. " _
& vbCrLf & vbCrLf & "Also ensure Zwift is running in game with workout dashboard showing.", 10, "Warning", 64
@victorypoint
victorypoint / zwift-incline-climb-portal.py
Last active November 7, 2024 00:02
Take Zwift screenshot, crop portal incline, OCR climb portal incline
# Zwift-Incline-Climb-Portal.py - Take Zwift screenshot, crop portal incline, OCR climb portal incline
# Author: Al Udell
# Revised: November 5, 2024
# imports
import cv2
import numpy as np
import re
from PIL import Image, ImageGrab
import requests
@victorypoint
victorypoint / zwift-incline.py
Last active November 5, 2024 16:42
Take Zwift screenshot, crop incline, OCR incline
# Zwift-Incline.py - Take Zwift screenshot, crop incline, OCR incline
# Author: Al Udell
# Revised: November 5, 2024
# imports
import cv2
import numpy as np
import re
from PIL import Image, ImageGrab
import requests
@victorypoint
victorypoint / ifit2-zwift-incline.vbs
Last active November 6, 2024 23:56
Zwift auto-incline control of treadmill via ADB and OCR
' iFit2-Zwift - Zwift auto-incline control of treadmill via ADB and OCR
' Author: Al Udell
' Revised: November 5, 2024
' To debug - enable wscript.echo and run by cscript in command line
' On Error Resume Next
' Display startup message
CreateObject("wscript.shell").Popup "Ensure treadmill is in manual workout mode with onscreen speed and incline controls visible." _
& vbCrLf & vbCrLf & "Also ensure Zwift is running in game with incline showing.", 10, "Warning", 64
@victorypoint
victorypoint / ifit2-incline-batch.vbs
Last active November 4, 2024 23:47
Test batch sequence of inclines with iFit2 auto-incline control of treadmill via ADB
' iFit2-Incline-Batch - Test batch sequence of inclines with iFit2 auto-incline control of treadmill via ADB
' Author: Al Udell
' Revised: November 4, 2024
' To debug - enable wscript.echo and run by cscript in command line
' On error resume next
' Initialize
set wso = createobject("wscript.shell")
buttonCount = 8 ' number of displayed buttons
@victorypoint
victorypoint / ifit2-speed-batch.vbs
Last active November 4, 2024 23:48
Test batch sequence of speeds with iFit2 auto-speed control of treadmill via ADB
' iFit2-Speed-Batch - Test batch sequence of speeds with iFit2 auto-speed control of treadmill via ADB
' Author: Al Udell
' Revised: November 4, 2024
' To debug - enable wscript.echo and run by cscript in command line
' On error resume next
' Initialize
set wso = createobject("wscript.shell")
buttonCount = 8 ' number of displayed buttons
@victorypoint
victorypoint / ifit2-control.vbs
Last active November 4, 2024 23:18
iFit2 auto-speed and auto-incline control of treadmill via ADB
' iFit2-Control - 'iFit2 auto-speed and auto-incline control of treadmill via ADB
' Author: Al Udell
' Revised: November 4, 2024
' To debug - enable wscript.echo and run by cscript in command line
' On error resume next
createobject("wscript.shell").popup "Ensure treadmill is in manual workout mode and onscreen speed and incline controls are visible", 5, "Warning", 64
' Initialize
@victorypoint
victorypoint / ifit2-metrics.vbs
Last active November 4, 2024 23:05
Retrieve iFit2 Workout Metrics (treadmill speed and incline) via ADB
' iFit2-Metrics - 'Retrieve iFit2 Workout Metrics ( treadmill speed and incline) via ADB
' Author: Al Udell
' Revised: November 4, 2024
'to debug - enable wscript.echo and run by cscript in command line
'on error resume next
'initialize
set wso = createobject("wscript.shell")