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

add msg_blinker demo #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add msg_blinker demo #17

wants to merge 1 commit into from

Conversation

dmbr0
Copy link

@dmbr0 dmbr0 commented Dec 22, 2023

added a demo that blinks the LED by passing messages between processes.

Copy link
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

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

Sorry, it looks like this was missed for a while. I just had a few comments, if you want to take care of those. We don't have any CI checks in place yet, but we should have you sign off on the commit. (Hint: git commit --amend --signoff after you make the changes)

@@ -0,0 +1,7 @@
{erl_opts, [debug_info]}.
{deps, [
{atomvm_lib, {git, "https://github.com/atomvm/atomvm_lib.git", {branch, "master"}}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This dependency shouldn't be necessary for this demo.

@@ -0,0 +1,4 @@
[{<<"atomvm_lib">>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

See above comment.


send_messages() ->
ReceiverPid = whereis(receiver),
ReceiverPid ! on,
Copy link
Collaborator

Choose a reason for hiding this comment

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

receiver ! on, works now if you want to make this a little cleaner, but that is up to you.

ReceiverPid = whereis(receiver),
ReceiverPid ! on,
timer:sleep(2000),
ReceiverPid ! off,
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

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.

2 participants