Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timers rework #404

Merged
merged 1 commit into from
Feb 24, 2022
Merged

timers rework #404

merged 1 commit into from
Feb 24, 2022

Conversation

burrbull
Copy link
Member

No description provided.

@burrbull burrbull force-pushed the delay-syst-micro branch 2 times, most recently from 79b1040 to 698fd15 Compare February 20, 2022 09:55
@burrbull burrbull marked this pull request as ready for review February 20, 2022 09:58
@samehmohamed88
Copy link

@burrbull I updated the Cargo.tml to point to this branch. The code compiles and flashes the chip with no problems, however while observing the LED I am noticing different behavior than what's programmed. For instance

loop {
            // On for 10s, off for 30s.
            led.set_high();
            // Use `embedded_hal::DelayMs` trait
            delay.delay_ms(10000_u32);
            led.set_low();
            // or use `fugit` duration units
            delay.delay(30.secs());
        }

If I understood the comments correctly the LED should remain on for 10s and off for 30s, however I am observing the opposite. The LED is on for 30s and off for 10s.

Is this just user error on my part?

@burrbull
Copy link
Member Author

It is just how your LED is connected on scheme.
set_high mean set +3.3 V on pin, set_low mean set 0 V.
If your LED is connected inverted, it will light at 0V and will be off at 3.3v

Copy link
Member

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 24, 2022

@bors bors bot merged commit f30cb81 into master Feb 24, 2022
@bors bors bot deleted the delay-syst-micro branch February 24, 2022 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants