Created
March 7, 2020 22:23
-
-
Save bettio/69165d73b0f7d735ff3aa46f9d70f5d1 to your computer and use it in GitHub Desktop.
Elixir morse encode example - step 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run "mix help deps" to learn about dependencies. | |
defp deps do | |
[ | |
+ {:exatomvm, github: "bettio/exatomvm", runtime: false} | |
# {:dep_from_hexpm, "~> 0.3.0"}, | |
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} | |
] | |
- deps: deps() | |
+ deps: deps(), | |
+ atomvm: [ | |
+ start: MorseEncoder, | |
+ flash_offset: 0x110000 | |
+ ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hello do | |
:world | |
end | |
+ | |
+ def start() do | |
+ hello() | |
+ |> :erlang.display() | |
+ | |
+ :timer.sleep(1000) | |
+ start() | |
+ end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment