Skip to content

Instantly share code, notes, and snippets.

@bettio
Created March 7, 2020 22:23
Show Gist options
  • Save bettio/69165d73b0f7d735ff3aa46f9d70f5d1 to your computer and use it in GitHub Desktop.
Save bettio/69165d73b0f7d735ff3aa46f9d70f5d1 to your computer and use it in GitHub Desktop.
Elixir morse encode example - step 1
# 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
+ ]
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