Hi Krishna,
I don’t have an example showing all aspects of how to use the ArduinoFrameworkFake at the moment, but I have been using it in the following library - GitHub - r89m/Transition: Arduino library for Transitioning between two values over time
The current setup is fairly specific to my machine as I have not yet made the Framework Fake PlatformIO compatible.
As an initial test, try cloning that library into a folder on your computer and also clone GitHub - r89m/ArduinoFrameworkFake to the same directory: ie
dev-folder
|-ArduinoFrameworkFake
|-src
|-Transition
|-src
|-tests
Then run pio test -e native
The library I’ve linked to only makes use of the millis()
function, although pinMode
, digitalRead
, digitalWrite
, analogRead
and analogWrite
are already supported. Adding additional methods is fairly trivial (and any pull requets would be greatly received!)
Let me know if you get stuck anywhere.
Richard