Skip to content

Instantly share code, notes, and snippets.

View adkron's full-sized avatar

Amos King adkron

View GitHub Profile
defmodule Zwave.Command.EnterInclusion.Pattern do
@moduledoc false
defmacro pattern do
quote do
<<0x00, 0x4A, 0xC1, 0x01>>
end
end
end
defmodule Zwave.Command.EnterInclusion.Pattern do
@moduledoc false
defmacro pattern do
quote do
<<0x00, 0x4A, 0xC1, 0x01>>
end
end
end
defmodule Zwave.Command.Test do
use ExUnit.Case, async: true
alias Zwave.Command
test "A non matching type passes through when deserialized" do
thing = make_ref()
assert thing == Command.Deserializable.deserialize(thing)
end
test "A binary being serialized should be the same" do
defmodule GrovePi.Sound.HysteresisTrigger do
@behaviour GrovePi.Trigger
@default_high_threshold 510
@default_low_threshold 490
@moduledoc """
This is the default triggering mechanism for Sound events. Events
are either `loud` or `quiet` and include the trigger state. It
contains to thresholds a `low_threshold` and a `high_threshold` for

AMOS KING

Agile Practitioner | Thought Leader | Web & Embedded Dev

Agile software developer with 10+ years of success working with and leading teams to develop quality software under changing requirements. Able to rapidly utilize new, leading edge technologies. Proven track record in developing trust with customers and within teams.

AMOS KING

Agile Practitioner | Thought Leader | Web and Embedded Developer

Agile software developer with 10+ years of success working with and leading teams to develop quality software under changing requirements. Able to rapidly utilize new, leading edge technologies. Proven track

AMOS KING

EXPERIENCE

owner/developer, Binary Noggin - St. James, MO August 2013 - Present

Working closely with customers in agile coaching, product development, and team augmentation. We believe in building amazing software through an understanding of the “why” in the product. We find this “why” through constant communication and trust. Using test driven development and continuous delivery of working software that exceeds expectations and provides constant value is our priority.

defmodule GrovePi.Sound do
use GenServer
@moduledoc """
Listen for events from a GrovePi button. There are two types of
events; pressed and released. When registering for an event the button
will then send a message of `{pin, :pressed}` or `{pin, :released}`.
The button works by polling `GrovePi.Digital` on the pin that you have
registered to a button.
defmodule GrovePi.BuzzerTest do
use ExUnit.Case
@pin 5
setup do
{:ok, _} = GrovePi.Buzzer.start_link(@pin)
GrovePi.I2C.reset(GrovePi.Board)
:ok
defmodule GrovePi.I2C do
use GenServer
defmacro __using__(_) do
quote do
@i2c Application.get_env(:grovepi, :i2c, ElixirALE.I2C)
end
end
@type i2c_address :: 0..127