commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 1 4.87k | subject stringlengths 15 778 | message stringlengths 15 8.75k | lang stringclasses 266
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
d91bb3157de6c168ae4db2255ff8dc7e1db00f9e | apiary.apib | apiary.apib | FORMAT: 1A
HOST: https://api.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | FORMAT: 1A
HOST: https://api.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | Add article description to API Blueprint | Add article description to API Blueprint
| API Blueprint | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend |
737d63212662bd361f9a815c0bebb0bef0ecbab6 | apiary.apib | apiary.apib | FORMAT: 1A
HOST: https://awesome-bucketlist-api.herokuapp.com/
# awesome-bucketlist
Polls is a simple API allowing consumers to view polls and vote in them.
## Bucketlists [/bucketlists]
### Create New Bucketlist [POST]
Creates a new bucketlist under your account.
+ Request (application/json)
+ Headers
... | FORMAT: 1A
HOST: https://awesome-bucketlist-api.herokuapp.com/
# awesome-bucketlist
A Bucketlist is a list of items, activities or goals you want to achieve before you "kick the bucket"
this is an API to allow you create a new user account, login into your account, create, update, view or delete
bucketlists and buck... | Update Introduction description for Apiary | [CHORE] Update Introduction description for Apiary | API Blueprint | mit | brayoh/bucket-list-api |
f3e8afdc001f067d1bbe4e2b229e95668e144ce2 | docs/src/rescues.apib | docs/src/rescues.apib | <!-- include(models.apib) -->
# Group Rescues
<!-- include(rescues/list.apib) -->
<!-- include(rescues/create.apib) -->
<!-- include(rescues/retrieve.apib) -->
<!-- include(rescues/update.apib) -->
| # Group Rescues
<!-- include(rescues/list.apib) -->
<!-- include(rescues/create.apib) -->
<!-- include(rescues/retrieve.apib) -->
<!-- include(rescues/search.apib) -->
<!-- include(rescues/update.apib) -->
| Add missing rescue search documentation | Add missing rescue search documentation
| API Blueprint | bsd-3-clause | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com |
ad753b96dd3aa1a8dc98a374dab0a348b2b9a0b4 | apiary.apib | apiary.apib | FORMAT: 1A
HOST: https://www.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/{locale}/articles/{id}]
A single Article object with all its details
+ Parameters
+ locale = `en` (optional, string, ... | FORMAT: 1A
HOST: https://www.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/{locale}/articles/{id}]
A single Article object with all its details
+ Parameters
+ locale = `en` (optional, string, ... | Fix locale example for API Blueprint | Fix locale example for API Blueprint
| API Blueprint | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend |
e222329dac958aa9bb692cd7478c12eac8681584 | apiary.apib | apiary.apib | FORMAT: 1A
HOST: https://api.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | FORMAT: 1A
HOST: https://api.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | Add link header to API Blueprint | Add link header to API Blueprint | API Blueprint | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend |
647b9e61df96ef25c3cee99f4984eaed51b27cbd | apiary.apib | apiary.apib | FORMAT: 1A
HOST: https://api.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | FORMAT: 1A
HOST: https://api.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | Add article description to API Blueprint | Add article description to API Blueprint | API Blueprint | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend |
fe36caff58afa25db3f76df5b68ce5b4e2b1ba34 | apiary.apib | apiary.apib | FORMAT: 1A
HOST: https://api.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | FORMAT: 1A
HOST: https://www.moneyadviceservice.org.uk
# Money Advice Service
API for the Money Advice Service.
# Articles
Article related resources of the **Money Advice Service**.
## Article [/articles/{id}]
A single Article object with all its details
+ Parameters
+ id (required, string, `foo-bar`) ... Strin... | Add URLs to API Blueprint | Add URLs to API Blueprint
| API Blueprint | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend |
16dd09c016c51e8075b3cc18d30f46e45a7f78a6 | test/fixtures/multiple-examples.apib | test/fixtures/multiple-examples.apib | FORMAT: 1A
# Machines API
# Group Machines
# Machines collection [/machines/{id}]
+ Parameters
- id (number, `1`)
## Get Machines [GET]
- Request (application/json)
+ Parameters
- id (number, `2`)
- Response 200 (application/json; charset=utf-8)
[
{
"type": "bulldozer",
"nam... | FORMAT: 1A
# Machines API
# Group Machines
# Machines collection [/machines/{id}]
+ Parameters
+ id (number, `1`)
## Get Machines [GET]
+ Request (application/json)
+ Parameters
+ id (number, `2`)
+ Response 200 (application/json; charset=utf-8)
[
{
"type": "... | Use 4 spaces as indentation | style: Use 4 spaces as indentation
| API Blueprint | mit | vladosaurus/dredd,apiaryio/dredd,vladosaurus/dredd,apiaryio/dredd,apiaryio/dredd |
e3bf046ed114424fa49e736e38b52be97afca244 | apiary.apib | apiary.apib | FORMAT: 1A
# Organising, Swiftly
_Organising_ is an outliner/todo list with strong search functionality.
## Node Collection [/nodes]
### Root node and all children [GET]
Returns the root node, with all of its children.
+ Response 200 (application/json)
{
"ID": 0,
"text": "Update repo",
... | FORMAT: 1A
# Organising, Swiftly
_Organising_ is an outliner/todo list with strong search functionality.
## Node Collection [/nodes]
### Root node and all children [GET]
Returns the root node, with all of its children.
+ Response 200 (application/json)
{
"ID": 0,
"text": "Update rep... | Correct API definition semantic issues. | Correct API definition semantic issues. | API Blueprint | mit | CheshireSwift/organising-swiftly,CheshireSwift/organising-swiftly |
24a87630536ac8b44500309692101c88d0885701 | MS3/QA/Examples/DC/SelectAdvanced.dyalog | MS3/QA/Examples/DC/SelectAdvanced.dyalog | msg←SelectAdvanced;result;output;sel;froot;prev
⍝ Test /Examples/DC/SelectAdvanced
⍝ Ensure 'multi' (the selection list) is there:
msg←'selection list not there'
:If 0≢sel←Find'multi'
⍝ Grab the 2 elements already chosen:
Click'PressMe'
output←Find'output'
{0≠⍴output.Text}Retry ⍬ ⍝ Wait to see if... | msg←SelectAdvanced;result;output;sel;froot;prev
⍝ Test /Examples/DC/SelectAdvanced
⍝ Ensure 'multi' (the selection list) is there:
msg←'selection list not there'
:If 0≢sel←Find'multi'
⍝ Grab the 2 elements already chosen:
Click'PressMe'
output←Find'output'
{0≠⍴output.Text}Retry ⍬ ⍝ Wait to see if... | Rename of SelectByText to SelectItemText | Rename of SelectByText to SelectItemText
| APL | mit | Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer |
ead24874953313e5f434d13fa8aced2f054eac5c | MS3/Examples/DC/EditFieldSimple.dyalog | MS3/Examples/DC/EditFieldSimple.dyalog | :Class EditFieldSimple : MiPageSample
⍝ Control:: _DC.EditField _DC.Button _html.label
⍝ Description:: Collect input and echo it on a button press
∇ Compose;btn;F1;label;name
:Access Public
F1←'myform'Add _.Form ⍝ Create a form
label←('for"name"')F1.Add _.label'Please enter your name'
... | :Class EditFieldSimple : MiPageSample
⍝ Control:: _DC.EditField _DC.Button _html.label
⍝ Description:: Collect input and echo it on a button press
∇ Compose;btn;F1;label;name
:Access Public
F1←'myform'Add _.Form ⍝ Create a form
label←('for="name"')F1.Add _.label'Please enter your name'
... | Add missing '=' in MS3/Examples/DC/EditFieldSample | Add missing '=' in MS3/Examples/DC/EditFieldSample
| APL | mit | Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer |
8f40bd95601a5f0e1bee2a40787e3ec0e362c0a2 | MS3/Code/MS3Server.dyalog | MS3/Code/MS3Server.dyalog | :Class MS3Server : MiServer
⍝ This is an example of a customized MiServer
⍝ The MiServer class exposes several overridable methods that can be customized by the user
⍝ In this case we customize the onServerLoad method
⍝ The ClassName parameter in the Server.xml configuration file is used to specify the customized clas... | :Class MS3Server : MiServer
⍝ This is an example of a customized MiServer
⍝ The MiServer class exposes several overridable methods that can be customized by the user
⍝ In this case we customize the onServerLoad method
⍝ The ClassName parameter in the Server.xml configuration file is used to specify the customized clas... | Upgrade message inculdes note of 15.0+ being free. | Upgrade message inculdes note of 15.0+ being free.
| APL | mit | Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer |
31522762e3e4a9e3ddfed315485fdaa02ff89d85 | MS3/Examples/html/aSimple.dyalog | MS3/Examples/html/aSimple.dyalog | :class aSimple : MiPageSample
⍝ Control:: _html.a
⍝ Description:: Insert a hyperlink
∇ Compose
:Access public
Add 'Click '
'href' 'http://www.dyalog.com/meet-team-dyalog.htm'Add _.a'here'
Add ' to meet us.'
∇
:endclass
| :class aSimple : MiPageSample
⍝ Control:: _html.a
⍝ Description:: Insert a hyperlink
∇ Compose
:Access public
Add'Click '
'href=http://www.dyalog.com/meet-team-dyalog.htm'Add _.a'here'
Add' to meet us.'
∇
:endclass
| Fix to new ParseAttr syntax | Fix to new ParseAttr syntax
| APL | mit | Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer |
6054d202ca88d93d6604694a18e912e1747b485c | 3-1.apl | 3-1.apl | #!/usr/local/bin/apl -s
'Day 3: Perfectly Spherical Houses in a Vacuum'
i ← (0 0)
cmds ← ('<' '>' '^' 'v')
dirs ← ((¯1 0) (1 0) (0 ¯1) (0 1))
houses ← ∪ (0 0) , i { ++\⍵ } { dirs[ti] ⊣ ti ← cmds ⍳ ⍵ } ⍞
⍴ houses ⍝ the amount of houses to visit
)OFF
| #!/usr/local/bin/apl -s
'Day 3: Perfectly Spherical Houses in a Vacuum'
cmds ← ('<' '>' '^' 'v')
dirs ← ((¯1 0) (1 0) (0 ¯1) (0 1))
houses ← ∪ (0 0) , { ++\⍵ } { dirs[ti] ⊣ ti ← cmds ⍳ ⍵ } ⍞
⍴ houses ⍝ the amount of houses to visit
)OFF
| Trim fat on apl nr 1 | Trim fat on apl nr 1
| APL | mit | profan/advent-of-code-2015,profan/advent-of-code-2015,profan/advent-of-code-2015 |
05b308db282b0f8a5b61e6ce144c5c564db3fe46 | MS3/Examples/HTML/abbrsample.dyalog | MS3/Examples/HTML/abbrsample.dyalog | :class abbrsample: MiPage
⍝ Control:: HTML.abbr
⍝ Description:: this is an example of use of abbr which allows you to display text when hovering over an area
⍝
⍝ This is an example of using the HTML 'abbr' element.
∇ Compose
:Access public
⍝ We simply display the text 'Hover over THIS to reveal.'
... | :class abbrsample: MiPage
⍝ Control:: HTML.abbr
⍝ Description:: this is an example of use of abbr which allows you to display text when hovering over an area
⍝ This is an example of using the HTML 'abbr' element.
∇ Compose
:Access public
⍝ We simply display the text 'Hover over THIS to reveal.'
... | Remove empty comment that messes up the index page | Remove empty comment that messes up the index page
| APL | mit | Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer |
36c34b538edb8a4e8d5eabb83cdac04078676d91 | lib/nehm/applescripts/add_track_to_playlist.applescript | lib/nehm/applescripts/add_track_to_playlist.applescript | on run argv
tell application "iTunes"
set p to first item of argv
set a to (p as POSIX file)
add a to playlist (second item of argv)
end tell
end run
| on run argv
set posixFile to first item of argv
set playlistName to second item of argv
tell application "iTunes"
set p to posixFile
set a to (p as POSIX file)
add a to playlist playlistName
end tell
end run
| Add explanation of arguments in AppleScript scripts | Add explanation of arguments in AppleScript scripts
| AppleScript | mit | bogem/nehm |
03e79121376c1776653bb1a70180cc1f58ef1324 | autoload/applescript/iterm.scpt | autoload/applescript/iterm.scpt | -- execute_iterm.scpt
-- last change: 19 Jan 2013
---
-- this script require an argument that represent the command to execute
on run argv
set command to (item 1 of argv)
tell application "iTerm"
try
set mysession to current session of current terminal
on error
se... | -- execute_iterm.scpt
-- last change: 19 Jan 2013
---
-- this script require an argument that represent the command to execute
on run argv
set command to (item 1 of argv)
tell application "iTerm"
try
set mysession to current session of current terminal
on error
set my... | Change session name to 'rspec' | Change session name to 'rspec' | AppleScript | mit | chautoni/tube.vim |
7624fbc0053bb4f97f1af4e4ef0d826b470cf435 | lib/scripts/get_state.applescript | lib/scripts/get_state.applescript | tell application "Spotify"
set cstate to "{"
set cstate to cstate & "\"track_id\": \"" & current track's id & "\""
set cstate to cstate & ",\"volume\": " & sound volume
set cstate to cstate & ",\"position\": " & player position
set cstate to cstate & ",\"state\": \"" & player state & "\""
set cstate to csta... | on replace_chars(this_text, search_string, replacement_string)
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item del... | Fix get state for locales that have commas as decimal delimiters | Fix get state for locales that have commas as decimal delimiters
When your current set locale uses "," as decimal delimiter, AppleScript
will automatically use this when you convert the number to a string. This
will break the JSON parsing for the callback, as "," is invalid when not
in quotes.
| AppleScript | mit | andrehaveman/spotify-node-applescript |
c7f2827b9a9923cf0ce0e07e6762feb40c67941e | Filterer.applescript | Filterer.applescript | on run
tell application "BibDesk"
try
set alertResult to display alert ("Really remove all linked files and private notes from " & name of first document as string) & "?" buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" as warning
if button returned of alertResult is "OK" then
save f... | on run
tell application "BibDesk"
try
set alertResult to display alert ("Really remove all linked files and private notes from " & name of first document as string) & "?" buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" as warning
if button returned of alertResult is "OK" then
set th... | Simplify filterer code so it actually works. | Simplify filterer code so it actually works.
| AppleScript | mit | kurtraschke/htmlbib,kurtraschke/htmlbib |
2b6069f41f0ecc505e5690153cc990ae6d7de5ad | autoload/applescript/iterm.scpt | autoload/applescript/iterm.scpt | -- execute_iterm.scpt
-- last change: 19 Jan 2013
---
-- this script require an argument that represent the command to execute
on run argv
set command to (item 1 of argv)
tell application "iTerm"
try
set mysession to current session of current terminal
on error
set my... | -- execute_iterm.scpt
-- last change: 19 Jan 2013
---
-- this script require an argument that represent the command to execute
on run argv
set command to (item 1 of argv)
tell application "iTerm"
repeat with _terminal in terminals
repeat with _session in (every session of _terminal whose name co... | Change script for rspec command only | Change script for rspec command only
| AppleScript | mit | chautoni/tube.vim |
7ea28364a90a68f480bffca668cee43160abecd7 | scripts/pdfmatch_folder_action.applescript | scripts/pdfmatch_folder_action.applescript | # AppleScript folder action for the pdfmatch command
#
# Open with script editor, compile and save to
# ~/Library/Workflows/Applications/Folder\ Actions/
#
# Then open the "Folder Actions Setup" application and add the work folder
# where your pdfmatch.json config lives and attach this script.
#
on adding folder items ... | # AppleScript folder action for the pdfmatch command
#
# Open with script editor, compile and save to
# ~/Library/Workflows/Applications/Folder\ Actions/
#
# Then open the "Folder Actions Setup" application and add the work folder
# where your pdfmatch.json config lives and attach this script.
#
on adding folder items ... | Remove my $PATH setting from default apple script | Remove my $PATH setting from default apple script
| AppleScript | mit | mantoni/pdfmatch.js |
fa78dd8d3fe31723a568999345ab067a25671d37 | actions/clearcache.applescript | actions/clearcache.applescript | -- clears workflow cache, including album artwork and compiled scripts --
on loadConfig()
return (load script POSIX file (do shell script "./resources/compile-config.sh"))
end loadConfig
on run query
set config to loadConfig()
try
tell application "Finder"
delete folder (workflowCacheFolder of config)
end t... | -- clears workflow cache, including album artwork and compiled scripts --
on loadConfig()
return (load script POSIX file (do shell script "./resources/compile-config.sh"))
end loadConfig
on run query
set config to loadConfig()
try
tell application "Finder"
delete folder (workflowCacheFolder of config)
end t... | Delete Alfred Play Song playlist when clearing cache | Delete Alfred Play Song playlist when clearing cache
This is becoming a helpful step when troubleshooting any issues.
| AppleScript | mit | caleb531/play-song,caleb531/play-song |
88a5decbde7d5704dfe3d69b48308044d0b969f9 | macos/chrome/current-song.scpt | macos/chrome/current-song.scpt | set theFolder to POSIX path of ((the path to me as text) & "::")
set Controller to run script ("script s" & return & (read alias (POSIX file (theFolder & "/lib/controller.scpt")) as «class utf8») & return & "end script " & return & "return s")
set currentTrack to Controller's getCurrentSong()
set output to item 1 of ... | set theFolder to POSIX path of ((the path to me as text) & "::")
set Controller to run script ("script s" & return & (read alias (POSIX file (theFolder & "/lib/controller.scpt")) as «class utf8») & return & "end script " & return & "return s")
set currentTrack to Controller's getCurrentSong()
try
set output to quot... | Set current song to empty string if nothing is playing | Set current song to empty string if nothing is playing
| AppleScript | mit | atsuya/google-music-control |
a79e8801a5c5d569d6946d8620ada322a6c73d8b | hammerspoon/connect_sony.applescript | hammerspoon/connect_sony.applescript | activate application "SystemUIServer"
tell application "System Events"
tell process "SystemUIServer"
set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth")
tell btMenu
click
try
tell (menu item "Rosco's Headphones" of menu 1)
... | -- Source: https://www.reddit.com/r/MacOS/comments/i4czgu/big_sur_airpods_script/gck3gz3
-- Works on macOS 11 Big Sur
use framework "IOBluetooth"
use scripting additions
set DeviceName to "Rosco's Headphones"
on getFirstMatchingDevice(deviceName)
repeat with device in (current application's IOBluetoothDevice's p... | Update headphone connect script for Big Sur | Update headphone connect script for Big Sur
| AppleScript | mit | rkalis/dotfiles,rkalis/dotfiles |
3e9fae2fc86014b80eedc757c3ddc6ad77a54fc4 | actions/play-direct.applescript | actions/play-direct.applescript | -- plays selected song or playlist directly (the Play Song v1 behavior)
-- for songs, this behavior continues playing music after the song finishes
on loadConfig()
return (load script POSIX file (do shell script "./resources/compile-config.sh"))
end loadConfig
on run query
set config to loadConfig()
set typeAndId... | -- plays selected song or playlist directly (the Play Song v1 behavior)
-- for songs, this behavior continues playing music after the song finishes
on loadConfig()
return (load script POSIX file (do shell script "./resources/compile-config.sh"))
end loadConfig
on run query
set config to loadConfig()
set typeAndId... | Fix bug where Apple Music playlists could not be played | Fix bug where Apple Music playlists could not be played
The bug in question was a regression introduced in c309730.
| AppleScript | mit | caleb531/play-song,caleb531/play-song |
fea9048e53742f63f867f60937203cf17597828e | indra/newview/installers/darwin/set-labels.applescript | indra/newview/installers/darwin/set-labels.applescript | -- This Applescript changes all of the icon labels on the disk image to
-- a different color.
-- Usage: osascript set-labels.applescript <volume-name>
-- where <volume-name> is the volume name of the disk image.
on run argv
tell application "Finder"
set diskname to item 1 of argv
set file_list to every file in d... | -- This Applescript changes all of the icon labels on the disk image to
-- a different color.
-- Usage: osascript set-labels.applescript <volume-name>
-- where <volume-name> is the volume name of the disk image.
on run argv
tell application "Finder"
set diskname to item 1 of argv
tell disk diskname
set file_l... | Make Mac disk image packager set application icon location more reliably. | Make Mac disk image packager set application icon location more reliably.
| AppleScript | lgpl-2.1 | gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm |
83a998ecff08e3022894f03af002f0048c60410c | dictlook-ui.scpt | dictlook-ui.scpt | on run {input}
try
do shell script "$HOME/Dropbox\\ \\(Personal\\)/projects/plover-tools/plover-dictionary-lookup/dictlook -x " & "\"" & input & "\""
display dialog result buttons {"OK"} default button 1
on error
display dialog "No such luck." buttons {"OK"} default button 1
beep
end try
end run
| on run {input}
try
do shell script "$HOME/Dropbox\\ \\(Personal\\)/projects/plover-tools/plover-dictionary-lookup/dictlook -x " & "\"" & input & "\""
display dialog result default answer "" buttons {"OK"} default button 1
on error
display dialog "No such luck." buttons {"OK"} default button 1
beep
... | Add practice text area to lookup dialog | Add practice text area to lookup dialog
| AppleScript | unlicense | dimonster/plover-dictionary-lookup |
d7f825bf51f42726f85b82ad495f83206a039690 | applescripts/halt_vagrant.applescript | applescripts/halt_vagrant.applescript | set close_vagrant to "z puppet; git pull; vagrant halt -f;"
-- close vagrant
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Default"
set mysession to current session
end tell
tell mysession
write text close_vagrant
end tell
delay 5
end tell
-- quit iTerm... | set close_vagrant to "z puppet; vagrant halt -f;"
-- close vagrant
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Default"
set mysession to current session
end tell
tell mysession
write text close_vagrant
end tell
delay 5
end tell
-- quit iTerm
ignoring ... | Remove git pull from closing Vagrant | Remove git pull from closing Vagrant
| AppleScript | mit | smathson/dotfiles |
f86f9827824ce3a105e55d6c3d713e1fce934058 | applescripts/open_chrome_tabs.applescript | applescripts/open_chrome_tabs.applescript | set myTabs to {"http://app.getsentry.com/", "http://app.ubervu.com/", "http://github.com/uberVU/thehole/issues/assigned/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open/", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/ubervu.com/#folders/0BzycGIkC5P50TXBlcTZoRXZ5VUE... | set myTabs to {"http://app.getsentry.com/", "http://github.com/uberVU/thehole/issues/assigned/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open/", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/hootsuite.com/#folders/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M"}
tell application "Go... | Change tabs to open at work | Change tabs to open at work
| AppleScript | mit | smathson/dotfiles |
7d08a4e2c7766a1d0f04c4020128e3edb1c47ca7 | contrib/mac/watch-workers.applescript | contrib/mac/watch-workers.applescript | set broker to "h8.opera.com"
set workers to {"h6.opera.com", "h8.opera.com", "h9.opera.com", "h10.opera.com"}
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
set number of columns to 80
set number of rows to 50
repeat with workerhost in workers
... | set broker to "h8.opera.com"
set workers to {"h6.opera.com", "h8.opera.com", "h9.opera.com", "h10.opera.com"}
set clock to "h6.opera.com"
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
set number of columns to 80
set number of rows to 50
repeat with w... | Update the watch workers applescript to watch the celerybeat log file. | Update the watch workers applescript to watch the celerybeat log file.
| AppleScript | bsd-3-clause | frac/celery,mitsuhiko/celery,ask/celery,frac/celery,WoLpH/celery,cbrepo/celery,mitsuhiko/celery,WoLpH/celery,ask/celery,cbrepo/celery |
6d11fe3774ad16f29b5f099cdb2dc82ff33db66e | macosx/scripts/iTunes/mobile-speakers.applescript | macosx/scripts/iTunes/mobile-speakers.applescript | (*
Script object to make calling a defined function easier while in the
iTunes and System Events name space.
*)
script remoteSpeakerFinder
-- Given a list of buttons, find the remote speakers button
-- by finding the first button with a name that isn't in a
-- rejection list.
on findCorrectButton (in_butto... | (*
Script object to make calling a defined function easier while in the
iTunes and System Events name space.
*)
script remoteSpeakerFinder
-- Given a list of buttons, find the remote speakers button
-- by finding the first button with a name that isn't in a
-- rejection list.
on findCorrectButton (in_butto... | Work around an issue with iTunes 9 that causes it to delay a connection to remote speakers | Work around an issue with iTunes 9 that causes it to delay a
connection to remote speakers
| AppleScript | bsd-3-clause | pjones/emacsrc |
acc8f3bba9d56463f8409c498fedf0bd403bc212 | applescripts/open_chrome_tabs.applescript | applescripts/open_chrome_tabs.applescript | set myTabs to {"http://app.getsentry.com/", "http://github.com/uberVU/thehole/issues/assigned/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open/", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/hootsuite.com/#folders/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M"}
tell application "Go... | set myTabs to {"https://github.com/search?utf8=%E2%9C%93&q=assignee%3Apalcu+state%3Aopen&type=Issues&ref=searchresults", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/hootsuite.com/#folders/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M"}
tell application "Google Chrome"
activate
repeat with i in myTabs... | Update URLs that open at the office | Update URLs that open at the office
| AppleScript | mit | smathson/dotfiles |
9b1d578b45f6811b43803231985841a8cc865e5e | km.scpt | km.scpt | try
get application id "com.stairways.keyboardmaestro.engine"
on error err_msg number err_num
return "Keyboard Maestro not found. First install it and then use this workflow."
end try
tell application id "com.stairways.keyboardmaestro.engine"
gethotkeys with asstring
end tell
| try
get application id "com.stairways.keyboardmaestro.engine"
on error err_msg number err_num
return "Keyboard Maestro not found. First install it and then use this workflow."
end try
tell application id "com.stairways.keyboardmaestro.engine"
gethotkeys with asstring and getall
end tell
| Update script to get ALL macros instead of just hotkeyed macros. | Update script to get ALL macros instead of just hotkeyed macros.
| AppleScript | mit | iansinnott/alfred-maestro,iansinnott/alfred-maestro |
d97b50320a0634e02f139c1218508ffd07b17894 | applescripts/open_vagrant.applescript | applescripts/open_vagrant.applescript | set open_vagrant to "z puppet; vagrant up;"
tell application "iTerm"
activate
try
set mysession to current session of current terminal
on error
set myterm to (make new terminal)
tell myterm
launch session "Default"
set mysession to current session
end tell
end try
tell mysession
write text open_... | set open_vagrant to "z puppet; vagrant up;"
set update_master to "/Users/alex/.homesick/repos/palcu/dotfiles/scripts/update_master.sh;"
tell application "iTerm"
activate
try
set mysession to current session of current terminal
on error
set myterm to (make new terminal)
tell myterm
launch session "Default"
... | Add update script to open vagrant applescript | Add update script to open vagrant applescript
| AppleScript | mit | smathson/dotfiles |
d5daba6eca89e39288c90e7df7fb9a31cb6985f1 | glob.arc | glob.arc |
(seval '(require file/glob))
(def glob (pat)
(each path (seval!glob pat #:capture-dotfiles? #t)
(let path (seval!path->string path)
(if (dir-exists path)
(out (+ path "/"))
(out path)))))
| (seval '(require file/glob))
(seval '(xdef cwd cwd))
(def glob (pat (o root (cwd)))
(each path (seval!glob pat #:capture-dotfiles? #t)
(aand (seval!path->string path)
(if (dir-exists it) (+ it "/") it)
(if (seval!string-prefix? it root)
(cut it (len root))
it)
... | Update GLOB to remove the cwd from each result | Update GLOB to remove the cwd from each result
| Arc | mit | laarc/laarc,laarc/laarc,laarc/laarc,laarc/laarc |
61c0b4c697364d2946a13b10cfeba880200b74fc | extras/arcfn-docs/generate.arc | extras/arcfn-docs/generate.arc | (system "rm -rf html")
(ensure-dir "html")
(load "template.arc")
(runall)
;; fails with "Expected tests" error
;; (run "foundation-doc.tem")
(system "cp foundation-doc.html html/")
(system "rm -rf output")
(ensure-dir "output")
(system "cp docs/* html/* output/")
| (declare 'atstrings nil)
(system "rm -rf html")
(ensure-dir "html")
(load "template.arc")
(runall)
;; fails with "Expected tests" error
;; (run "foundation-doc.tem")
(system "cp foundation-doc.html html/")
(system "rm -rf output")
(ensure-dir "output")
(system "cp docs/* html/* output/")
| Disable atstrings when generating arcfn docs. | Disable atstrings when generating arcfn docs.
Maybe need to re-enable it when we add docs about atstrings. Currently
just disable it to make generate.arc works.
| Arc | mit | LaxWorks/news,LaxWorks/news,LaxWorks/news,LaxWorks/news |
0538f13c7a02bbed22c48e66defffd83d8490c97 | Arduino/photoresistorTest/photoresistorTest.ino | Arduino/photoresistorTest/photoresistorTest.ino | const int BUFFER_SIZE = 4;
int m_buffer[BUFFER_SIZE];
int m_bufIndex = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int val = readValue();
//Serial.print("Voltage");
//Serial.print("\t");
Serial.println(val... | const int BUFFER_SIZE = 8;
int m_buffer[BUFFER_SIZE];
int m_bufIndex = 0;
unsigned long m_timer = 0;
int m_counter = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
m_timer = millis();
// Timer0 is already used for millis() - we'll just interrupt somewhere
// in the middle a... | Use interrupt for timing the sample read | Use interrupt for timing the sample read
| Arduino | mit | paasovaara/nes-zapper,paasovaara/nes-zapper |
32450dfc4d84715c02a736a81a7de4e4464e70aa | interduino/src/sketch.ino | interduino/src/sketch.ino | // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
int pinState[6];
void loop()
{
if(Serial.available()){
int ledState = Serial.read();
if(ledState == 65){
digitalWri... | // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
int pinState[6];
void loop()
{
if(Serial.available()){
int ledState = Serial.read();
if(ledState == 65){
digitalWri... | Change logic for serial commands | Change logic for serial commands
| Arduino | agpl-3.0 | NegativeK/telehack,NegativeK/telehack |
ab7365abca627adb621d9ebee16bebc1dcccc212 | EmotionalClothing.ino | EmotionalClothing.ino | #include <WaveHC.h>
#include <WaveUtil.h>
SdReader card; // This object holds the information for the card
FatVolume vol; // This holds the information for the partition on the card
FatReader root; // This holds the information for the volumes root directory
WaveHC wave; // This is the only wave (audio) ... | #include <WaveHC.h>
#include <WaveUtil.h>
String fileNames[4] = {"BUGS2.WAV", "DAFFY1.WAV", "BUGS1.WAV", "DAFFY2.WAV"};
SdReader card; // This object holds the information for the card
FatVolume vol; // This holds the information for the partition on the card
FatReader root; // This holds the information for ... | Test out some wave files | Test out some wave files
| Arduino | mit | IgorGee/Emotional-Clothing |
0c30491456aa01f15e0b660d7cc3e59e0428fa80 | examples/simple/simple.ino | examples/simple/simple.ino | #include "ConfigManager.h"
struct Config {
char name[20];
bool enabled;
int8 hour;
char password[20];
} config;
struct Metadata {
int8 version;
} meta;
ConfigManager configManager;
void createCustomRoute(ESP8266WebServer *server) {
server->on("/custom", HTTPMethod::HTTP_GET, [server](){
... | #include "ConfigManager.h"
struct Config {
char name[20];
bool enabled;
int8 hour;
char password[20];
} config;
struct Metadata {
int8 version;
} meta;
ConfigManager configManager;
void createCustomRoute(ESP8266WebServer *server) {
server->on("/custom", HTTPMethod::HTTP_GET, [server](){
... | Move begin down in example | Move begin down in example
| Arduino | mit | nrwiersma/ConfigManager,nrwiersma/ConfigManager |
b2f1ef016c3d6acb02fe0d76512e6b8e7802acba | interduino/src/sketch.ino | interduino/src/sketch.ino | // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
int pinState[6];
void loop()
{
if(Serial.available()){
int ledState = Serial.read();
if(ledState == 65){
digitalWri... | // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
int pinState[6];
void loop()
{
if(Serial.available()){
int ledState = Serial.read();
if(ledState == 65){
digitalWri... | Add main func to stop build from breaking on akira | Add main func to stop build from breaking on akira
| Arduino | agpl-3.0 | NegativeK/telehack,NegativeK/telehack |
45e217a8d4a79f02b8104e28a5370b663d03d0ed | src/zapper/zapper.ino | src/zapper/zapper.ino | const int outPinLed = 2;
const int inPinTrigger = 7;
const int inPinDetector = 4;
int triggerPressed = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(outPinLed, OUTPUT);
digitalWrite(outPinLed, LOW);
pinMode(inPinTrigger, INPUT);
pinMode(inPinDetector, INPUT);
... | const int outPinLed = 2;
const int inPinTrigger = 7;
const int inPinDetector = A0;
int triggerPressed = 0;
int detectorValue = 1023;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(outPinLed, OUTPUT);
digitalWrite(outPinLed, LOW);
pinMode(inPinTrigger, INPUT_PULLUP);... | Read detector value to A0 | Read detector value to A0
| Arduino | mit | paasovaara/nes-zapper,paasovaara/nes-zapper |
717ee6a456bde931b11a55082807e534cd8333d7 | examples/mqtt_auth/mqtt_auth.ino | examples/mqtt_auth/mqtt_auth.ino | /*
Basic MQTT example with Authentication
- connects to an MQTT server, providing username
and password
- publishes "hello world" to the topic "outTopic"
- subscribes to the topic "inTopic"
*/
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
const char *ssid = "xxxxxxxx"; // cannot be longer than 32 c... | /*
Basic MQTT example with Authentication
- connects to an MQTT server, providing username
and password
- publishes "hello world" to the topic "outTopic"
- subscribes to the topic "inTopic"
*/
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
const char *ssid = "xxxxxxxx"; // cannot be longer than 32 c... | Update the authentication example using an MQTT::Connect object directly | Update the authentication example using an MQTT::Connect object directly
| Arduino | mit | Protoneer/pubsubclient,hemantsangwan/Arduino-PubSubClient,doebi/pubsubclient,vshymanskyy/pubsubclient,Protoneer/pubsubclient,vshymanskyy/pubsubclient,vshymanskyy/pubsubclient,koltegirish/pubsubclient,liquiddandruff/pubsubclient,doebi/pubsubclient,koltegirish/pubsubclient,hemantsangwan/Arduino-PubSubClient,Protoneer/pub... |
5078efe6f28fa287e8f23e97104cdd565dd04834 | tests/TestSystemInfo/TestSystemInfo.ino | tests/TestSystemInfo/TestSystemInfo.ino | # 2 "TestSystemInfo.ino"
#include <Arduino.h>
#include <Arduino_FreeRTOS.h>
#include <StandardCplusplus.h>
#include <RabirdToolkit.h>
#include <RTest.h>
#include <RRawPointer.h>
#include <RSharedPointer.h>
#include <RFormatter.h>
RTEST(TestSystemInfo)
{
RFormatter formatter(manager()->printer());
formatter("Siz... | # 2 "TestSystemInfo.ino"
#include <Arduino.h>
#include <Arduino_FreeRTOS.h>
#include <StandardCplusplus.h>
#include <RabirdToolkit.h>
#include <RTest.h>
RTEST(TestSystemInfo)
{
RASSERT_MORE(sizeof(int), 0);
RASSERT_MORE(sizeof(uintptr_t), 0);
RASSERT_MORE(sizeof(rsize), 0);
RASSERT_MORE(sizeof(rnumber), 0);
... | Use assert macro for print out system info | Use assert macro for print out system info
| Arduino | mit | starofrainnight/ArduinoRabirdToolkit,starofrainnight/ArduinoRabirdTookit,starofrainnight/ArduinoRabirdToolkit |
0052a1fcc31dba9ea62dad934e1ac9f5e12fbce1 | examples/Sample1-Basic/Sample1-Basic.ino | examples/Sample1-Basic/Sample1-Basic.ino | #include <Arduboy.h>
#include <ArdVoice.h>
#include "voices.h"
Arduboy arduboy;
ArdVoice ardvoice;
void setup() {
arduboy.begin();
arduboy.setFrameRate(30);
ardvoice.playVoice(merry_q6);
}
void loop() {
if (!(arduboy.nextFrame()))
return;
if (arduboy.pressed(B_BUTTON)){
ardvoice.playVoice(merry_q6);
}
... | #include <Arduboy2.h>
#include <ArdVoice.h>
#include "voices.h"
Arduboy2 arduboy;
ArdVoice ardvoice;
void setup() {
arduboy.begin();
arduboy.setFrameRate(30);
ardvoice.playVoice(merry_q6);
}
void loop() {
if (!(arduboy.nextFrame()))
return;
if (arduboy.pressed(B_BUTTON)){
ardvoice.playVoice(merry_q6);
}
... | Modify samples to use Arduboy2 library | Modify samples to use Arduboy2 library | Arduino | apache-2.0 | igvina/ArdVoice |
9977bbffb998230b2ded806eb02f9e81daba9f8e | Arduino/ADXL335/ADXL335.ino | Arduino/ADXL335/ADXL335.ino | int vinpin = A0;
int voutpin = A1;
int gndpin = A2;
int zpin = A3;
int ypin = A4;
int xpin = A5;
void setup() {
Serial.begin(9600);
pinMode(vinpin, OUTPUT); digitalWrite(vinpin, HIGH);
pinMode(gndpin, OUTPUT); digitalWrite(gndpin, LOW);
pinMode(voutpin, INPUT);
pinMode(xpin, INPUT);
pinMode(ypin, INPUT);
... | int zpin = A3;
int ypin = A4;
int xpin = A5;
// Uncomment the following lines if you're using an ADXL335 on an
// Adafruit breakout board (https://www.adafruit.com/products/163)
// and want to plug it directly into (and power it from) the analog
// input pins of your Arduino board.
//int vinpin = A0;
//int voutpin = A... | Comment out power pins in ADXL example code. | Comment out power pins in ADXL example code.
With a note that you should uncomment them if you want to power the
ADXL335 (on Adafruit breakout) by plugging it directly into the Arduino.
| Arduino | bsd-3-clause | damellis/ESP,damellis/ESP |
6b570a8b9433f10d8acd2c73f4ad0485ca3e0821 | WeatherThing.ino | WeatherThing.ino | #include "display.h"
#include "sensor.h"
#include <LiquidCrystal.h> // Arduino LCD library
#include <Arduino.h> // enables use of byte pics
void setup() {
LCD::setup();
Sensor::setup();
}
void loop() {
int temp = Sensor::readTemp();
LCD::displayTemp(temp);
delay(5000);
LCD::clearScreen();
}
| #include "display.h"
#include "sensor.h"
#include <LiquidCrystal.h> // Arduino LCD library
#include <Arduino.h> // enables use of byte pics
void setup() {
Display::setup();
Sensor::setup();
}
void loop() {
int temp = Sensor::readTemp();
int hum = Sensor::readHum();
Display::displayTemp(temp);
Display::d... | Update lcd to display and add loop functionality | Update lcd to display and add loop functionality | Arduino | mit | satelliteworkshops/arduino-workshop,satelliteworkshops/arduino-workshop,satelliteworkshops/arduino-workshop |
988cf74261742feb6a764cb35a022e7324c64158 | steppercontrol/steppercontrol.ino | steppercontrol/steppercontrol.ino | int motorPin = 9;
int switchPin = 7;
int motorStep = 0;
int maxStep = 200;
int minimumStepDelay = 2;
String motorState = String("off");
void makeStep() {
digitalWrite(motorPin, HIGH);
digitalWrite(motorPin, LOW);
motorStep += 1;
if (motorStep > maxStep) {
motorStep = 0;
}
}
void resetMotor() {
for (... | int enablePin = 4;
int MS1Pin = 5;
int MS2Pin = 6;
int MS3Pin = 7;
int resetPin = 9;
int sleepPin = 10;
int motorPin = 11;
int directionPin = 12;
int switchPin = 13;
// Stepping: Full, half, quarter, eigth, sixteenth
int[] stepping = {
B000,
B100,
B010,
B110,
B111
}
int motorStep = 0;
int maxStep = 200;
i... | Add correct pinout for all optional pins | Add correct pinout for all optional pins
| Arduino | mit | kirberich/3dscanner |
edf3afd9411e9d8c0553198f5e1d351614adde20 | basic/TheThingsUno/workshop/project/project.ino | basic/TheThingsUno/workshop/project/project.ino | #define DEBUG
#include "TheThingsUno.h"
const byte devAddr[4] = { 0x02, 0xDE, 0xAE, 0x00 };
const byte appSKey[16] = { 0x0D, 0x0E, 0x0A, 0x0D, 0x0B, 0x0E, 0x0E, 0x0F, 0x0C, 0x0A, 0x0F, 0x0E, 0x0B, 0x0A, 0x0B, 0x0E };
const byte nwkSKey[16] = { 0x0D, 0x0E, 0x0A, 0x0D, 0x0B, 0x0E, 0x0E, 0x0F, 0x0C, 0x0A, 0x0F, 0x0E, 0x... | #define DEBUG
#include "TheThingsUno.h"
const byte devAddr[4] = { /* copy DevAddr here */ };
const byte appSKey[16] = { /* copy AppSKey here */ };
const byte nwkSKey[16] = { /* copy NwkSKey here */ };
#define debugSerial Serial
#define loraSerial Serial1
// These are the input pins of your sensors
#define TEMPSENSO... | Remove pre-filled DevAddr and Keys | Remove pre-filled DevAddr and Keys | Arduino | mit | TheThingsNetwork/workshops,TheThingsNetwork/workshops |
c0ad0c5d9f708763ec3f9aac13bcd87b50bc7783 | Arduino/Liberty/examples/TestSuite/TestSuite.ino | Arduino/Liberty/examples/TestSuite/TestSuite.ino | /*
TestSuite sketch
Use this sketch when running the Liberty Arduino Feature test suite.
*/
#include <EEPROM.h>
#include <Liberty.h>
Liberty liberty("TestNode");
boolean ns = false;
int nc = 0;
unsigned long ln;
byte bs[20];
void setup() {
liberty.sram(sramBytes, 20);
liberty.invocable("foo", &foo);
... | /*
TestSuite sketch
Use this sketch when running the Liberty Arduino Feature test suite.
*/
#include <EEPROM.h>
#include <Liberty.h>
Liberty liberty("TestNode");
boolean ns = false;
int nc = 0;
unsigned long ln;
byte bs[50];
void setup() {
liberty.sram(bs, 50);
liberty.invocable("foo", &foo);
libert... | Fix bug in sram size | Fix bug in sram size
| Arduino | apache-2.0 | WASdev/sample.arduino,WASdev/sample.arduino,WASdev/sample.arduino |
41729b5096e9c27eb48b916b547dc373e6bccdec | usbvibration/usbvibration.ino | usbvibration/usbvibration.ino | // https://github.com/thomasfredericks/Metro-Arduino-Wiring
#include <Metro.h>
const int MOTORPIN = 2;
Metro blink = Metro(400);
bool isVibrationOn = false;
bool isMotorOn = false;
uint32_t now;
void onMotor(void)
{
digitalWrite(MOTORPIN, HIGH);
isMotorOn = true;
}
void offMotor(void)
{
digitalWrite(MOT... | // https://www.pjrc.com/teensy/td_libs_TimerOne.html
#include <TimerThree.h>
const int MOTORPIN = 5;
void parseMessage(int letter)
{
switch (letter) {
case 'v':
Timer3.pwm(MOTORPIN, 512);
break;
case 'V':
Timer3.pwm(MOTORPIN, 0);
break;
default:
break;
}
}
... | Use TimerThree library to blink motor | Use TimerThree library to blink motor
| Arduino | mit | deton/LyncRingNotify |
13b92e9b31d1042c5edaf88e7382074c897745eb | src/arduino_lights_controller/arduino_lights_controller.ino | src/arduino_lights_controller/arduino_lights_controller.ino | int incomingByte = 0; // for incoming serial data
int relay1 = 4;
int relay2 = 5;
boolean state1 = false;
boolean state2 = false;
void setup() {
Serial.begin(9600);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
}
void loop() {
if (Serial.available() > 0) {
incomingByte = Serial.read();
if (incomingBy... | int incomingByte = 0; // for incoming serial data
int relay1 = 4;
int relay2 = 5;
boolean state1 = false;
boolean state2 = false;
void setup() {
Serial.begin(9600);
pinMode(relay1, OUTPUT);
pinMode(relay2, OUTPUT);
}
void loop() {
if (Serial.available() > 0) {
incomingByte = Serial.read();
if (incomi... | Fix variable name bug in Arduino code | Fix variable name bug in Arduino code
| Arduino | mit | VoidingWarranties/Myo-Home |
aed4e0adbe33f5cc2c2f9a107e0b9e602a9bd923 | water_heater_monitor/thermometer.ino | water_heater_monitor/thermometer.ino | /**
* Wrapper for a thermometer.
*
* In this case it's a BMP085 barometric sensor, because that's what I had laying around.
*/
#include <Wire.h>
#include <I2Cdev.h>
#include <BMP085.h>
BMP085 barometer;
boolean hasThermometer;
boolean initThermometer () {
Serial.print(F("Setting up BMP085 for temperature..."))... | /**
* Wrapper for a thermometer.
*
* In this case it's a BMP085 barometric sensor, because that's what I had laying around.
*/
#include <Wire.h>
#include <Adafruit_BMP085.h>
Adafruit_BMP085 barometer;
boolean hasThermometer;
boolean initThermometer () {
Serial.print(F("Setting up BMP085 for temperature..."));
... | Switch to Adafruit's BPM085 library. | Switch to Adafruit's BPM085 library.
Lighter code and saves about 10 bytes.
| Arduino | isc | lectroidmarc/water-heater-monitor |
be7640530a68bda10148c90e86ce2b904fdc6b4a | EmotionalClothing.ino | EmotionalClothing.ino | void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
| #include <WaveHC.h>
#include <WaveUtil.h>
SdReader card; // This object holds the information for the card
FatVolume vol; // This holds the information for the partition on the card
FatReader root; // This holds the information for the volumes root directory
WaveHC wave; // This is the only wave (audio) ... | Implement initial setup for Wave Shield | Implement initial setup for Wave Shield
| Arduino | mit | IgorGee/Emotional-Clothing |
abf302309c4e9a459e341f68da59b7581061b76c | examples/Boards_Bluetooth/ESP32_BLE/ESP32_BLE.ino | examples/Boards_Bluetooth/ESP32_BLE/ESP32_BLE.ino | /*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces... | /*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces... | Add setDeviceName for ESP32 BLE | Add setDeviceName for ESP32 BLE
| Arduino | mit | blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library |
f54ae7fff2687991cb7619c1b902bf8d5502d12d | paperweight/Paperweight/Paperweight.ino | paperweight/Paperweight/Paperweight.ino | const int PIN_DATA = 4;
const int PIN_LATCH = 3;
const int PIN_CLOCK = 2;
byte arrivalStatus = 1;
void setup() {
pinMode(PIN_DATA, OUTPUT);
pinMode(PIN_CLOCK, OUTPUT);
pinMode(PIN_LATCH, OUTPUT);
}
void loop() {
digitalWrite(PIN_LATCH, LOW);
shiftOut(PIN_DATA, PIN_CLOCK, MSBFIRST, arrivalStatus);... | const int PIN_DATA = 4;
const int PIN_LATCH = 3;
const int PIN_CLOCK = 2;
void setup() {
//Initialize Shift register
pinMode(PIN_DATA, OUTPUT);
pinMode(PIN_CLOCK, OUTPUT);
pinMode(PIN_LATCH, OUTPUT);
//Initialize Serial Port
Serial.begin(9600);
}
void loop() {
//Wait for a single byte
... | Read data from serial port | Read data from serial port
read single byte from serial port, use that to update the LEDs.
| Arduino | unlicense | PiJoules/PhillyCodeFest2016,PiJoules/Septa-Notifier,PiJoules/PhillyCodeFest2016,PiJoules/PhillyCodeFest2016,PiJoules/Septa-Notifier,PiJoules/Septa-Notifier,PiJoules/PhillyCodeFest2016,PiJoules/Septa-Notifier |
be0832ae1be13d0d2742684367259065323414f4 | LightScale/LightScale.ino | LightScale/LightScale.ino | const byte SCALE_VALUE[] = { 0b00000100, 0b00001100, 0b00011100, 0b00111100};
int senzor = A0;
void setup() {
Serial.begin(9600);
pinMode(senzor, INPUT);
// porty 2,3,4,5 jako vystup
DDRD |= 0b00111100;
}
void loop() {
int light = analogRead(senzor);
Serial.println(light);
int scale = map(light, 400... | const byte SCALE_VALUE[] = { 0b00000100, 0b00001100, 0b00011100, 0b00111100};
// fotorezistor - A1, termistor - A0
int senzor = A1;
void setup() {
Serial.begin(9600);
pinMode(senzor, INPUT);
// porty 2,3,4,5 jako vystup
DDRD |= 0b00111100;
}
void loop() {
int light = analogRead(senzor);
Serial.println(li... | Update map and bit mask | Update map and bit mask
| Arduino | apache-2.0 | bechynsky/ArduinoWorkshop,bechynsky/ArduinoWorkshop |
9275283d6d9853f54f45cd2ec295969374532501 | firmware/Arduino/Arduino.ino | firmware/Arduino/Arduino.ino | void setup() {
Serial.begin(9600);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
for (int ... | void setup() {
Serial.begin(9600);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
for (int ... | Change initial state of all pins to LOW for new Relay Module | ENH: Change initial state of all pins to LOW for new Relay Module | Arduino | bsd-3-clause | SiLab-Bonn/basil,SiLab-Bonn/basil,MarcoVogt/basil |
94aa676a99f774fcf8be41763ffe80533a3cfee6 | tuto-samples/arduino/gpiotime_2_blink_wrong.ino | tuto-samples/arduino/gpiotime_2_blink_wrong.ino | #define LED 53
void setup()
{
pinMode(LED, OUTPUT);
}
void loop()
{
digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
| #define LED 53
void setup()
{
pinMode(LED, OUTPUT);
}
void loop()
{
digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
| Add blank line for tuto sample. | Add blank line for tuto sample.
| Arduino | lgpl-2.1 | jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib |
67997a66053886365b458c2e9e3ed39c4a400c48 | build/shared/examples/01.Basics/BareMinimum/BareMinimum.ino | build/shared/examples/01.Basics/BareMinimum/BareMinimum.ino |
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
| void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
| Revert "make editor folding happy" | Revert "make editor folding happy"
This reverts commit e0926139fb61f7edbc38dd5bf7aaff1644e07a8f.
| Arduino | lgpl-2.1 | NicoHood/Arduino,niggor/Arduino_cc,acosinwork/Arduino,jomolinare/Arduino,KlaasDeNys/Arduino,weera00/Arduino,ForestNymph/Arduino_sources,raimohanska/Arduino,koltegirish/Arduino,HCastano/Arduino,laylthe/Arduino,lukeWal/Arduino,PeterVH/Arduino,bigjosh/Arduino,eduardocasarin/Arduino,superboonie/Arduino,nkolban/Arduino,zede... |
b9103f07cddbca791bf262913bf68e5d3ad60dda | examples/DroneSimpleRadioDrive/DroneSimpleRadioDrive.ino | examples/DroneSimpleRadioDrive/DroneSimpleRadioDrive.ino | #include <MINDS-i-Drone.h>
ServoGenerator::Servo drive, steer;
void setup() {
drive.attach(12 /* APM pin 1 */);
steer.attach(11 /* APM pin 2 */);
ServoGenerator::begin();
//set the initial throttle/direction for the ESC/servo
drive.write(90);
steer.write(90);
APMRadio::setup();
Serial.begin(9600);
... | #include <MINDS-i-Drone.h>
ServoGenerator::Servo drive, steer, backsteer;
void setup() {
drive.attach(12 /* APM pin 1 */);
steer.attach(11 /* APM pin 2 */);
backsteer.attach(8 /* APM pin 3 */);
ServoGenerator::begin();
//set the initial throttle/direction for the ESC/servo
drive.write(90);
steer.write... | Add backsteer to drone radio drive | Add backsteer to drone radio drive
| Arduino | apache-2.0 | MINDS-i/MINDS-i-Drone,MINDS-i/MINDS-i-Drone |
2263c84c7a910474c0e2b8b5ab96c91b49aea910 | arduinoApp/gardenSketch/gardenSketch.ino | arduinoApp/gardenSketch/gardenSketch.ino | /*
Arduino based self regulating kitchen garden
*/
#include <DHT.h>
// temperature related setup
#define DHTPIN 2 // Humidity and temperature sensor pin
#define DHTTYPE DHT22 // Model DHT 22 (AM2302)
DHT airSensor(DHTPIN, DHTTYPE); // setup DHT sensor
float airHumidity;
float airTemperature;
// light r... | /*
Arduino based self regulating kitchen garden
*/
#include <SHT1x.h>
#include <DHT.h>
// soil related setup
#define soilDataPin 3
#define soilClockPin 4
SHT1x soilSensor(soilDataPin, soilClockPin);
float soilTemperature;
float soilMoisture;
// air temperature related setup
#define DHTPIN 2 // Humidity an... | Add SHT10 sensor and fix some setup | Add SHT10 sensor and fix some setup
| Arduino | apache-2.0 | eikooc/KitchenGarden,eikooc/KitchenGarden,eikooc/KitchenGarden,eikooc/KitchenGarden |
93650e833c64ef21e7318b22e37d125328169ce8 | bolt-arduino.ino | bolt-arduino.ino | #ifndef BOLTARDUINO
#define BOLTARDUINO
#include "button.h"
#include "led.h"
#include "screen.h"
#include "game.h"
#include "const.h"
#include "clock.h"
void setup() {
Serial.begin(115200);
//Attach interrupt for 64 button shield
attachInterrupt(digitalPinToInterrupt(P_BUTTON_INTERRUPT), button_ISR, FALLING)... | #ifndef BOLTARDUINO
#define BOLTARDUINO
#include "button.h"
#include "led.h"
#include "screen.h"
#include "game.h"
#include "const.h"
#include "clock.h"
#include "controller.h"
void setup() {
Serial.begin(115200);
//Attach interrupt for 64 button shield
attachInterrupt(digitalPinToInterrupt(P_BUTTON_INTERRUP... | Add missing import to main .ino file | Add missing import to main .ino file
| Arduino | mit | SUPERETDUPER/bolt-arduino |
ffa95f67e90df3507d71b2cbdce57fff4c8d07c6 | coffee-scale.ino | coffee-scale.ino | #include <RunningAverage.h>
#include <HX711.h>
#include "TimerDisplay.h"
#include "GramsDisplay.h"
#define DISP_TIMER_CLK 2
#define DISP_TIMER_DIO 3
#define DISP_SCALE_CLK 8
#define DISP_SCALE_DIO 9
#define SCALE_DT A2
#define SCALE_SCK A1
#define FILTER_SIZE 10
#define SCALE_FACTOR 1874
#define SCALE_OF... | #include <RunningAverage.h>
#include <HX711.h>
#include "TimerDisplay.h"
#include "GramsDisplay.h"
#define DISP_TIMER_CLK 2
#define DISP_TIMER_DIO 3
#define DISP_SCALE_CLK 8
#define DISP_SCALE_DIO 9
#define SCALE_DT A2
#define SCALE_SCK A1
#define FILTER_SIZE 10
#define SCALE_FACTOR 1874
#define SCALE_OF... | Put opening braces on separate line | Put opening braces on separate line
| Arduino | mit | mortenfyhn/coffee-scales |
e7edbed6c37a8de4abdef71d83445f137da2c881 | counter/counter.ino | counter/counter.ino | #include <Bridge.h>
#include "logger.h"
#include "thingspeakReceiver.h"
ThingspeakReceiver thingspeakReceiver;
#include <Adafruit_LEDBackpack.h>
#include <Adafruit_GFX.h>
#include <Wire.h>
#define PIN_LED 13
Adafruit_7segment matrix = Adafruit_7segment();
void setup() {
pinMode(PIN_LED, OUTPUT);
Bridge.be... | #include <Bridge.h>
#include "logger.h"
/////////////////////////////////////////////
// Include of Iot Platform's connectors
#include "thingspeakReceiver.h"
ThingspeakReceiver thingspeakReceiver;
int thingsSpeakCounter = 0;
#include "shiftrConnector.h"
ShiftrConnector shiftrConnector;
int shiftrCounter = 0;
///////... | Use of ShiftrConnector as receiver | Use of ShiftrConnector as receiver
| Arduino | mit | Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot |
86bc4fa88dd808961f9faa874a7a4d7758359aca | examples/Basics/PowerOFF/PowerOFF.ino | examples/Basics/PowerOFF/PowerOFF.ino | #include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// initialize the M5Stack object
M5.begin();
// Lcd display
M5.Lcd.println("This is software power off demo");
M5.Lcd.println("Press the button A to power off.");
// Set the wakeup button
M5.Power.setWakeupButto... | #include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// initialize the M5Stack object
M5.begin();
// Lcd display
M5.Lcd.println("This is software power off demo");
M5.Lcd.println("Press the button A to power off.");
}
// the loop routine runs over and over again forever... | Remove settin wakeup button from poserOFF example | Remove settin wakeup button from poserOFF example | Arduino | mit | m5stack/M5Stack,m5stack/M5Stack,m5stack/M5Stack |
a852f5cda020742a2225ae5de40df05ffba84349 | counter/counter.ino | counter/counter.ino | #include <Bridge.h>
#include "thingspeakReceiver.h"
ThingspeakReceiver thingspeakReceiver;
#include <Adafruit_LEDBackpack.h>
#include <Adafruit_GFX.h>
#include <Wire.h>
#define PIN_LED_KO 12
#define PIN_LED_OK 13
Adafruit_7segment matrix = Adafruit_7segment();
void setup() {
pinMode(PIN_LED_KO, OUTPUT);
... | #include <Bridge.h>
#include "logger.h"
#include "thingspeakReceiver.h"
ThingspeakReceiver thingspeakReceiver;
#include <Adafruit_LEDBackpack.h>
#include <Adafruit_GFX.h>
#include <Wire.h>
#define PIN_LED 13
Adafruit_7segment matrix = Adafruit_7segment();
void setup() {
pinMode(PIN_LED, OUTPUT);
Bridge.be... | Remove non-necessary code for the demo | Remove non-necessary code for the demo
| Arduino | mit | Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot |
2853f90a74444ba7782239d016a3bbd18168f33b | spi_read_eeprom.ino | spi_read_eeprom.ino | #include <SPI.h>
#define SPI_READ_CMD 0x03
#define CS_PIN 10
unsigned int num_bytes;
unsigned int i;
void setup() {
Serial.begin(115200);
pinMode(CS_PIN, OUTPUT);
digitalWrite(CS_PIN, HIGH);
SPI.begin();
}
void read_eeprom(unsigned int num_bytes) {
unsigned int addr;
byte resp;
digitalWrite(CS_PIN, ... | #include <SPI.h>
#define SPI_READ_CMD 0x03
#define CS_PIN 10
void setup() {
Serial.begin(115200);
pinMode(CS_PIN, OUTPUT);
digitalWrite(CS_PIN, HIGH);
SPI.begin();
}
void read_eeprom(unsigned int num_bytes) {
unsigned int addr;
byte resp;
digitalWrite(CS_PIN, LOW);
/* transmit read command with 3 ... | Convert global variables to local | Convert global variables to local
Just a minor edit to move these (unnecessary) global variables into local scope. | Arduino | mit | andre-richter/arduino-spi-read-eeprom,andre-richter/arduino-spi-read-eeprom |
b0b2f48534069cd51a30bde092466a4474e0cb53 | Proto-1/Proto-1.ino | Proto-1/Proto-1.ino | #include <Wire.h>
#include <LiquidCrystal_I2C.h>
static constexpr unsigned long TimeChunk = 2 * 1000;
static LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
static unsigned long endTime;
static bool previousPressed;
void setup()
{
lcd.begin(16,2);
lcd.backlight();
pinMode(A0, INPUT_PULLUP);
delay... | #include <Wire.h>
#include <LiquidCrystal_I2C.h>
static constexpr unsigned long TimeChunk = 2 * 1000;
static LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
static unsigned long endTime;
static bool previousPressed;
void setup()
{
lcd.begin(16,2);
lcd.backlight();
pinMode(A0, INPUT_PULLUP);
delay... | Fix ghost press at launch | Fix ghost press at launch
| Arduino | mit | KoltesDigital/Final-Countdown |
dce927901e531e534e940849fa1320f738c24902 | firmware/examples/readTag/readtag.ino | firmware/examples/readTag/readtag.ino | #include "pn532_i2c_particle/pn532_i2c_particle.h"
#include "pn532_i2c_particle/PN532.h"
#include "pn532_i2c_particle/NfcAdapter.h"
PN532_I2C pn532_i2c(Wire);
NfcAdapter nfc = NfcAdapter(pn532_i2c);
void setup(void) {
Serial.begin(9600);
Serial.println("NDEF Reader");
nfc.begin();
}
void loop(void) {
... | #include "pn532_i2c_particle/pn532_i2c_particle.h"
#include "pn532_i2c_particle/PN532.h"
#include "pn532_i2c_particle/NfcAdapter.h"
PN532_I2C pn532_i2c(Wire);
NfcAdapter nfc = NfcAdapter(pn532_i2c);
void setup(void) {
Serial.begin(9600);
Serial.println("NDEF Reader");
nfc.begin();
}
void loop(void) {
... | Update readTag to fetch just the payload from the messages on the tag | Update readTag to fetch just the payload from the messages on the tag
| Arduino | mit | reducedhackers/pn532nfcshield,reducedhackers/pn532nfcshield,reducedhackers/pn532_i2c_particle,reducedhackers/pn532_i2c_particle |
642a62afeac424163d8dd065a4b4edffb66b77f8 | examples/CalibrateESCs/CalibrateESCs.ino | examples/CalibrateESCs/CalibrateESCs.ino | #include "Wire.h"
#include "SPI.h"
#include "MINDS-i-Drone.h"
#include "platforms/Quadcopter.h"
void setup(){
calibrateESCs();
}
void loop(){
output.stop();
}
| #include "Wire.h"
#include "SPI.h"
#include "MINDS-i-Drone.h"
#include "platforms/Quadcopter.h"
void setup(){
calibrateESCs();
output.disable();
}
void loop(){
}
| Disable the output after calibrating instead of deprecated stop | Disable the output after calibrating instead of deprecated stop
| Arduino | apache-2.0 | MINDS-i/MINDS-i-Drone,MINDS-i/MINDS-i-Drone |
a729ee70f95e61e7532a6f1336ba570a151a9d5f | examples/Basics/PowerOFF/PowerOFF.ino | examples/Basics/PowerOFF/PowerOFF.ino | #include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// initialize the M5Stack object
M5.begin();
// Lcd display
M5.Lcd.println("This is software power off demo");
M5.Lcd.println("Press the button A to power off.");
// Set the wakeup button
M5.setWakeupButton(BUTT... | #include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// initialize the M5Stack object
M5.begin();
// Lcd display
M5.Lcd.println("This is software power off demo");
M5.Lcd.println("Press the button A to power off.");
// Set the wakeup button
M5.Power.setWakeupButto... | Update poser off example for new api. | Update poser off example for new api. | Arduino | mit | m5stack/M5Stack,m5stack/M5Stack,m5stack/M5Stack |
06d424038dfc0e5be3f9679b7c5d97e98a2fd280 | arduino-workshop.ino | arduino-workshop.ino | #include "lcd.h"
#include "sensor.h"
void setup() {
LCD::setup();
LCD::helloworld();
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
| #include "lcd.h"
#include "sensor.h"
void setup() {
LCD::setup();
LCD::helloworld();
}
void loop() {
}
| Remove useless comments from ino | Remove useless comments from ino
| Arduino | mit | satelliteworkshops/arduino-workshop,satelliteworkshops/arduino-workshop,satelliteworkshops/arduino-workshop |
0b74a04599dcf8281f56fb30ee842efa0adc1bd8 | WizardView.ino | WizardView.ino | #include "receiver.h"
Receiver rx1 = Receiver(2, 3, 4);
Receiver rx2 = Receiver(2, 3, 5);
Receiver rx3 = Receiver(2, 3, 6);
Receiver rx4 = Receiver(2, 3, 7);
void setup() {
// Wait for modules to settle.
delay(1000);
// Set to race frequencies.
rx1.setFrequency(5665);
rx2.setFrequency(5745);
... | #include "receiver.h"
Receiver rx1 = Receiver(2, 3, 4);
Receiver rx2 = Receiver(2, 3, 5);
Receiver rx3 = Receiver(2, 3, 6);
Receiver rx4 = Receiver(2, 3, 7);
void setup() {
// Wait for modules to settle.
delay(2000);
// Set to race frequencies.
rx1.setFrequency(5805);
delay(500);
rx2.setFre... | Add some delays between setting channels + flash LED | Add some delays between setting channels + flash LED
| Arduino | mit | PropNuts/wizardtracker-hardware,PropNuts/wizardtracker-hardware |
8b76365b29ffa98e2355a9ecf16519003e43d5eb | bolt-arduino.ino | bolt-arduino.ino | #include "button.h"
#include "led.h"
#include "screen.h"
#include "game.h"
#include "clock.h"
#include "const.h"
#include "controller.h"
#include "flasher.h"
#include "logger.h"
void setup() {
Serial.begin(115200);
//Attach interrupt for 64 button shield
attachInterrupt(digitalPinToInterrupt(P_BUTTON_INTERRUPT... | #include "button.h"
#include "led.h"
#include "screen.h"
#include "game.h"
#include "clock.h"
#include "const.h"
#include "controller.h"
#include "flasher.h"
#include "logger.h"
void setup() {
Serial.begin(115200);
//Attach interrupt for 64 button shield
attachInterrupt(digitalPinToInterrupt(P_BUTTON_INTERRUPT... | Change flashing button to 0 from 1 | Change flashing button to 0 from 1
| Arduino | mit | SUPERETDUPER/bolt-arduino |
3fac52a6a53b88b1e3e69e666c0ae54c955ca743 | bolt-arduino.ino | bolt-arduino.ino | #include "button.h"
#include "led.h"
#include "screen.h"
#include "game.h"
#include "timer.h"
#include "const.h"
#include "controller.h"
#include "flasher.h"
#include "logger.h"
#include "helper.h"
void setup() {
Serial.begin(115200);
//Generate new random seed
randomSeed(analogRead(0));
//Setup
button::s... | #include "button.h"
#include "led.h"
#include "screen.h"
#include "game.h"
#include "timer.h"
#include "const.h"
#include "controller.h"
#include "flasher.h"
#include "logger.h"
#include "helper.h"
void setup() {
Serial.begin(115200);
//Generate new random seed
randomSeed(analogRead(0));
//Setup
button::s... | Move main to setup to not repeat | Move main to setup to not repeat
| Arduino | mit | SUPERETDUPER/bolt-arduino |
480e263364f9cae075f26d9f73b7cca43a27caa1 | Examples/ReadAll.ino | Examples/ReadAll.ino | /*
Author: Andrea Stagi <stagi.andrea@gmail.com>
Example: ReadAll
Description: fetch all devices and relative temperatures
on the wire bus on pin 5 and send them via serial port.
*/
#include <OneWire.h>
#include <DSTemperature.h>
DSTemperature ds(5); // on pin 5
void setup(void) {
Serial.begin(9600);
ds... | /*
Author: Andrea Stagi <stagi.andrea@gmail.com>
Example: ReadAll
Description: fetch all devices and relative temperatures
on the wire bus on pin 5 and send them via serial port.
*/
#include <OneWire.h>
#include <DSTemperature.h>
DSTemperature ds(5); // on pin 5
void setup(void) {
Serial.begin(9600);
ds... | Use ds_addr instead of ds | Use ds_addr instead of ds
| Arduino | mit | astagi/DSTemperature |
82f272e4df08be3321b4d4205163c08712dab460 | timer/timer.ino | timer/timer.ino |
#include "Constants.h"
#include "Display.h"
#include "Buttons.h"
Display display;
Buttons buttons;
unsigned long start_time = 0;
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
start_time = millis();
}
void loop() {
unsigned long current_time = millis() - start_time;
display.displayTime( current... |
#include "Constants.h"
#include "Display.h"
#include "Buttons.h"
Display display;
Buttons buttons;
unsigned long countdown_ends;
unsigned long countdown_duration;
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
countdown_ends = 0;
countdown_duration = 900000; // 15 mins in ms
countdown_ends = mill... | Change code to count down instead of up | Change code to count down instead of up
| Arduino | agpl-3.0 | OmniRose/watch-timer,OmniRose/watch-timer |
7662a945fe24cc038c44c9e5a502264762c17c5a | riptide_serial/firmware/thruster_control_sketch/thruster_control_sketch.ino | riptide_serial/firmware/thruster_control_sketch/thruster_control_sketch.ino | #include <ros.h>
ros::NodeHandle nh;
std_msgs::Float64 state;
void callback(const std_msgs::Float64 cmd);
{
}
ros::Publisher state_pub("state", &state);
ros::Subscriber<std_msgs::Float64> cmd_sub("command", &callback);
void setup()
{
nh.initNode();
nh.advertise(state_pub);
}
void loop()
{
nh.spinOnce();
... | #include <Wire.h>
#include <ros.h>
#include <std_msgs/Int8.h>
ros::NodeHandle nh;
std_msgs::Int8 state;
ros::Publisher state_pub("state", &state);
void callback(const std_msgs::Int8 &cmd)
{
state.data = 0;
state_pub.publish(&state);
Wire.beginTransmission(3);
Wire.write(0x10);
Wire.write(0x10);
Wire.w... | Add i2c to thruster control sketch. | Add i2c to thruster control sketch.
| Arduino | bsd-2-clause | tsender/riptide_software,osu-uwrt/riptide-ros,tsender/riptide_software,osu-uwrt/riptide-ros,JustBenj/riptide_software,dmae1600/riptide-ros,JustBenj/riptide_software,dmae1600/riptide-ros,dmae1600/riptide-ros,tsender/riptide_software,JustBenj/riptide_software,dmae1600/riptide-ros,JustBenj/riptide_software,tsender/riptide... |
2c65615bec6840177a096f6ceaa2317b9a340e49 | examples/PassThrough/PassThrough.ino | examples/PassThrough/PassThrough.ino | /**
* Use this sketch to talk directly to the LoRa module.
*
* In Serial Monitor, select "Both NL & CR" and "9600 baud" in
* the bottom right dropdowns and send command a command like:
*
* mac get deveui
* sys reset
*/
#define loraSerial Serial1
#define debugSerial Serial
void setup() {
loraSerial.begin(57... | /**
* Use this sketch to talk directly to the LoRa module.
*
* In Serial Monitor, select "Both NL & CR" and "115200 baud" in
* the bottom right dropdowns and send command a command like:
*
* mac get deveui
* sys reset
*/
#define loraSerial Serial1
#define debugSerial Serial
void setup() {
while(!debugSeria... | Update pass through to work with Node | Update pass through to work with Node
| Arduino | mit | TheThingsNetwork/arduino-device-lib,TheThingsNetwork/arduino-device-lib,TheThingsNetwork/arduino-device-lib |
f1b313c38094b104ea370653e450c9e4c079cd40 | examples/Basics/PowerOFF/PowerOFF.ino | examples/Basics/PowerOFF/PowerOFF.ino | #include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// initialize the M5Stack object
M5.begin();
// Lcd display
M5.Lcd.println("This is software power off demo");
M5.Lcd.println("Press the button A to power off.");
// Set the wakeup button
M5.Power.setWakeupButto... | #include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// initialize the M5Stack object
M5.begin();
// Lcd display
M5.Lcd.println("This is software power off demo");
M5.Lcd.println("Press the button A to power off.");
// Set the wakeup button
M5.Power.setWakeupButto... | Use powerOFF on powerOFF example | Use powerOFF on powerOFF example | Arduino | mit | m5stack/M5Stack,m5stack/M5Stack,m5stack/M5Stack |
5072cadb1bb79f185d8910fff4fdde7442a2100c | examples/SerialPrinterEnableInterrupt/SerialPrinterEnableInterrupt.ino | examples/SerialPrinterEnableInterrupt/SerialPrinterEnableInterrupt.ino | /*
This example is basically the same as SimpleSerialPrinter but utilize
the EnableInterrupt library. EnableInterrupt make pin change
interrupts available and thus allows to use arbitrary pins.
*/
// EnableInterrupt from https://github.com/GreyGnome/EnableInterrupt
// include it before RadiationWatch.h
#include "Enab... | /*
This example is basically the same as SimpleSerialPrinter but utilize
the EnableInterrupt library.
The EnableInterrupt library make pin change interrupts available and
thus allows to use arbitrary pins.
See a list of pins supported here:
https://github.com/GreyGnome/EnableInterrupt/wiki/Usage#pin--port-bestiary
Y... | Add link to EnableInterupt pin beastiary | Add link to EnableInterupt pin beastiary
| Arduino | mit | MonsieurV/ArduinoPocketGeiger |
3bdf6ee88f733f6f13d8306d9ee4879902376d7c | firmware/examples/readTag/readtag.ino | firmware/examples/readTag/readtag.ino | #include "pn532_i2c_particle/pn532_i2c_particle.h"
#include "pn532_i2c_particle/PN532.h"
#include "pn532_i2c_particle/NfcAdapter.h"
PN532_I2C pn532_i2c(Wire);
NfcAdapter nfc = NfcAdapter(pn532_i2c);
void setup(void) {
Serial.begin(9600);
Serial.println("NDEF Reader");
nfc.begin();
}
void loop(void) {
... | #include "pn532_i2c_particle/pn532_i2c_particle.h"
#include "pn532_i2c_particle/PN532.h"
#include "pn532_i2c_particle/NfcAdapter.h"
PN532_I2C pn532_i2c(Wire);
NfcAdapter nfc = NfcAdapter(pn532_i2c);
void setup(void) {
Serial.begin(9600);
Serial.println("NDEF Reader");
nfc.begin();
}
void loop(void) {
... | Update readTag to fetch just the payload from the messages on the tag | Update readTag to fetch just the payload from the messages on the tag
| Arduino | mit | reducedhackers/pn532nfcshield,reducedhackers/pn532_i2c_particle,reducedhackers/pn532nfcshield,reducedhackers/pn532_i2c_particle |
2f1b90ec759761c91af7664f48668852cbafd26a | arduino/led_matrix/led_matrix.ino | arduino/led_matrix/led_matrix.ino |
#include <FastLED.h>
#define WIDTH 16
#define HEIGHT 16
#define NUM_LEDS (WIDTH * HEIGHT)
#define PIN 6
#define BAUD 115200
#define BRIGHTNESS 32
CRGB leds[NUM_LEDS];
int r, g, b;
int x, y, yy;
void setup() {
FastLED.addLeds<WS2812B, PIN>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(BRI... |
#include <FastLED.h>
#define WIDTH 16
#define HEIGHT 16
#define NUM_LEDS (WIDTH * HEIGHT)
#define PIN 6
#define BAUD 115200
#define BRIGHTNESS 8
CRGB leds[NUM_LEDS];
int r, g, b;
int x, y, yy;
void setup() {
FastLED.addLeds<WS2812B, PIN>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(BRIG... | Reduce led brightness to save my eyes. | Reduce led brightness to save my eyes.
| Arduino | mit | Spooner/pixel-table,Spooner/pixel-table,Spooner/pixel-table |
bbc6d312d356d51004b993b1928f583e5b7b4d8d | MiniSumoStraitght/MiniSumoStraitght.ino | MiniSumoStraitght/MiniSumoStraitght.ino | #include <MiniRobot.h>
MiniRobot robot;
void setup() {
}
void loop() {
if (robot.leftEdge() && robot.distanceToEnemy() == 0) {
robot.leftBack();
} else {
robot.leftForward();
}
if (robot.rightEdge() && robot.distanceToEnemy() == 0) {
robot.rightBack();
} else {
robot.rightForward();
}
}
| #include <MiniRobot.h>
MiniRobot robot;
byte status = 2;
/*
0 - don't need changes;
1 - counter only
2 - drive straight back;
3 - drive straight forward;
4 - spin around
- enemy forward;
*/
int count = 0;
void setup() {
PCMSK1 |= bit(0) | bit(1);
PCIFR |= bit(1);
PCICR |= bit(1);
pinMode(A0,INPUT); // ... | Use interrupt to IR sensors | Use interrupt to IR sensors
| Arduino | mit | makerspacelt/NTAsumoBot |
284d555b122ad17a9eccefb973ec571c493c7dd9 | Watering/Watering.ino | Watering/Watering.ino | #include "Watering.h"
void setup () {
//Init serial connection
Serial.begin(SERIAL_BAUD);
//Init LED Pin
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
}
void loop() {
if ( Serial.available() ) {
byte command = Serial.read();
switch( command ) {
case WATER_LEVEL:
brea... | #include "Watering.h"
void setup () {
//Init serial connection
Serial.begin(SERIAL_BAUD);
//Init LED Pin
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
}
void loop() {
if ( Serial.available() ) {
byte command = Serial.read();
byte output[4];
byte numBytes = 0;
switch( command ... | Send a response after the Arduino has completed its work. | Send a response after the Arduino has completed its work.
| Arduino | mit | jaredwolff/arduino-raspberrypi-serial-example |
47e23614af14a5bf5385cf093b7623285fd94552 | Arduino-code/two-sensors-test/two-sensors-test.ino | Arduino-code/two-sensors-test/two-sensors-test.ino | /*
Pines of the first sensor.
*/
#define S1echo 7
#define S1trig 8
/*
Pines of the second sensor.
*/
#define S2echo 10
#define S2trig 11
long duration, distance;
void setup() {
/*
Setup of the echo & trig of everysensor.
*/
pinMode(S1echo, INPUT);
//pinMode(S2echo, INPUT);
pinMode(S1trig, OUTPUT);
//... | /*
Pines of the first sensor.
*/
#define S1echo 7
#define S1trig 8
/*
Pines of the second sensor.
*/
#define S2echo 10
#define S2trig 11
long duration, distance;
void setup() {
Serial.begin(9600);
/*
Setup of the echo & trig of everysensor.
*/
pinMode(S1echo, INPUT);
//pinMode(S2echo, INPUT);
pinM... | Change on Serial stuff to show data | Change on Serial stuff to show data
| Arduino | apache-2.0 | Michotastico/Ultrasonic-sensors-project |
1551a1509410c4c0481309fff94c815bb9518bb4 | examples/Boards_USB_Serial/chipKIT_Uno32/chipKIT_Uno32.ino | examples/Boards_USB_Serial/chipKIT_Uno32/chipKIT_Uno32.ino | /**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tuto... | /**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tuto... | Switch chipKIT UNO32 to use new Stream API | Switch chipKIT UNO32 to use new Stream API
| Arduino | mit | ivankravets/blynk-library,blynkkk/blynk-library,ivankravets/blynk-library,ivankravets/blynk-library,ivankravets/blynk-library,blynkkk/blynk-library,ivankravets/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library |
a07135953d243ad2fc7869da66244bdd9ec70006 | examples/DoorSensor/DoorSensor.ino | examples/DoorSensor/DoorSensor.ino | #include <Homie.h>
const int doorPin = 16;
Bounce debouncer = Bounce(); // Bounce is built into Homie, so you can use it without including it first
unsigned long lastDoorValue = -1;
HomieNode doorNode("door", "door");
void loopHandler() {
int doorValue = debouncer.read();
if (doorValue != lastDoorValue) {
... | #include <Homie.h>
const int PIN_DOOR = 16;
Bounce debouncer = Bounce(); // Bounce is built into Homie, so you can use it without including it first
unsigned long lastDoorValue = -1;
HomieNode doorNode("door", "door");
void loopHandler() {
int doorValue = debouncer.read();
if (doorValue != lastDoorValue) {
... | Fix caps in constant example | Fix caps in constant example
| Arduino | mit | euphi/homie-esp8266,marvinroger/homie-esp8266,marvinroger/homie-esp8266,euphi/homie-esp8266,marvinroger/homie-esp8266,euphi/homie-esp8266,marvinroger/homie-esp8266,euphi/homie-esp8266 |
294654c326b715ed26e8910b1429f26ec95af053 | examples/moving_average/moving_average.ino | examples/moving_average/moving_average.ino | // Moving Average Example
// Shows how to use an FIR filter as a moving average on a simple
// set of data that can be easily verified by hand.
#include <FIR.h>
// Make an instance of the FIR filter. In this example we'll use
// floating point values and an 8 element filter. For a moving average
// that means an 8 po... | // Moving Average Example
// Shows how to use an FIR filter as a moving average on a simple
// set of data that can be easily verified by hand.
#include <FIR.h>
// Make an instance of the FIR filter. In this example we'll use
// floating point values and an 8 element filter. For a moving average
// that means an 8 po... | Change to use automatic gain. | Change to use automatic gain.
| Arduino | mit | LeemanGeophysicalLLC/FIR_Filter_Arduino_Library |
bc5538ad2eee292d99e0088edfb00a6379042dbd | examples/sensors/ultrasounds/HCSR04/HCSR04.ino | examples/sensors/ultrasounds/HCSR04/HCSR04.ino | #include <Smartcar.h>
SR04 front;
const int TRIGGER_PIN = 6; //D6
const int ECHO_PIN = 7; //D7
void setup() {
Serial.begin(9600);
front.attach(TRIGGER_PIN, ECHO_PIN); //trigger pin, echo pin
}
void loop() {
Serial.println(front.getDistance());
delay(100);
}
| #include <Smartcar.h>
const int TRIGGER_PIN = 6; //D6
const int ECHO_PIN = 7; //D7
SR04 front(TRIGGER_PIN, ECHO_PIN, 10);
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(front.getDistance());
delay(100);
}
| Update SR04 example to new 5.0 API | Update SR04 example to new 5.0 API
| Arduino | mit | platisd/smartcar_shield,platisd/smartcar_shield |
11352d2fbdf8b4e8f50011b70a35cb02b9af1d79 | Arduino/ADXL335/ADXL335.ino | Arduino/ADXL335/ADXL335.ino | int vinpin = A0;
int voutpin = A1;
int gndpin = A2;
int zpin = A3;
int ypin = A4;
int xpin = A5;
void setup() {
Serial.begin(115200);
pinMode(vinpin, OUTPUT); digitalWrite(vinpin, HIGH);
pinMode(gndpin, OUTPUT); digitalWrite(gndpin, LOW);
pinMode(voutpin, INPUT);
pinMode(xpin, INPUT);
pinMode(ypin, INPUT);... | int vinpin = A0;
int voutpin = A1;
int gndpin = A2;
int zpin = A3;
int ypin = A4;
int xpin = A5;
void setup() {
Serial.begin(9600);
pinMode(vinpin, OUTPUT); digitalWrite(vinpin, HIGH);
pinMode(gndpin, OUTPUT); digitalWrite(gndpin, LOW);
pinMode(voutpin, INPUT);
pinMode(xpin, INPUT);
pinMode(ypin, INPUT);
... | Change baud rate to 9600. | Change baud rate to 9600.
| Arduino | bsd-3-clause | damellis/ESP,damellis/ESP |
fac842f4f5206cfc1d80d63bd7a38cddd8e7078c | payload/payload.ino | payload/payload.ino | #include <Wire.h>
// begin SD card libraries
#include <BlockDriver.h>
#include <FreeStack.h>
#include <MinimumSerial.h>
#include <SdFat.h>
#include <SdFatConfig.h>
#include <SysCall.h>
// end SD card libraries
#include "Bmp180.h" // RCR header
File file; // file object
//SdFatSdio sd_card; // MicroSD card
namespace... | #include <Wire.h>
// begin SD card libraries
#include <BlockDriver.h>
#include <FreeStack.h>
#include <MinimumSerial.h>
#include <SdFat.h>
#include <SdFatConfig.h>
#include <SysCall.h>
// end SD card libraries
#include "Bmp180.h" // RCR header
namespace rcr {
namespace level1payload {
Bmp180 bmp;
File file; // file... | Implement custom BMP data structure in program | Implement custom BMP data structure in program
| Arduino | mit | nolanholden/geovis,nolanholden/payload-level1-rocket,nolanholden/geovis,nolanholden/geovis |
6b48bf0b8a7eeb86a4ab6dcdfc9f42834b16c527 | zg01/zg01.ino | zg01/zg01.ino | #include <stdint.h>
#include "zg01_fsm.h"
#define PIN_CLOCK 2
#define PIN_DATA 3
#define PIN_LED 13
static uint8_t buffer[5];
void setup(void)
{
// initialize ZG01 pins
pinMode(PIN_CLOCK, INPUT);
pinMode(PIN_DATA, INPUT);
// initialize LED
pinMode(PIN_LED, OUTPUT);
// initialize s... | #include <stdint.h>
#include "zg01_fsm.h"
#define PIN_CLOCK 2
#define PIN_DATA 3
#define PIN_LED 13
static uint8_t buffer[5];
void setup(void)
{
// initialize ZG01 pins
pinMode(PIN_CLOCK, INPUT);
pinMode(PIN_DATA, INPUT);
// initialize LED
pinMode(PIN_LED, OUTPUT);
// initialize s... | Fix order of Serial.println arguments for HEX printing | Fix order of Serial.println arguments for HEX printing
| Arduino | mit | revspace/co2sensor,revspace/co2sensor,vvzvlad/co2sensor_esp8266,vvzvlad/co2sensor_esp8266 |
8c98c4758bf9490ed21513a2e926416b4fe74641 | examples/ambientlight/ambientlight.ino | examples/ambientlight/ambientlight.ino | //
// FaBo AmbientLight Brick
//
// brick_i2c_ambientlight
//
#include <Wire.h>
#include "fabo-isl29034.h"
void setup()
{
Serial.begin(115200);
faboAmbientLight.configuration();
faboAmbientLight.powerOn();
}
void loop()
{
double ambient = faboAmbientLight.readData();
Serial.print("Ambient:");
Seria... | //
// FaBo AmbientLight Brick
//
// brick_i2c_ambientlight
//
#include <Wire.h>
#include "fabo-isl29034.h"
FaBoAmbientLight faboAmbientLight;
void setup()
{
Serial.begin(115200);
faboAmbientLight.configuration();
faboAmbientLight.powerOn();
}
void loop()
{
double ambient = faboAmbientLight.readData();
... | Update class name. ToDo: search slave address. | Update class name.
ToDo: search slave address.
| Arduino | apache-2.0 | FaBoPlatform/FaBoAmbientLight-ISL29034-Library |
0c2bb4e831da84baaeb837246912140787e0d4bd | firmware/examples/parse_hex.ino | firmware/examples/parse_hex.ino | // This provides a variable, colour, a function to set the variable from a hex
// string, set_colour, and programs the RGB LED on the spark core to reflect
// the RRGGBB value last programmed. The default on reboot is black.
// BEWARE: British spelling ahead!
#include "spark-parse.h"
static int colour = 0;
int set... | #include "spark-parse/spark-parse.h"
// This provides a variable, colour, a function to set the variable from a hex
// string, set_colour, and programs the RGB LED on the spark core to reflect
// the RRGGBB value last programmed. The default on reboot is black.
// BEWARE: British spelling ahead!
static int colour =... | Correct the include path to the one the Spark IDE wants | Correct the include path to the one the Spark IDE wants
| Arduino | mit | iawells/spark-parse,iawells/spark-parse |
ad4bf3eb698ae7d81a0b08ec5f8bd9f444100650 | build/shared/examples/6.Strings/StringReplace/StringReplace.ino | build/shared/examples/6.Strings/StringReplace/StringReplace.ino | /*
String replace()
Examples of how to replace characters or substrings of a string
created 27 July 2010
modified 2 Apr 2012
by Tom Igoe
Hardware Required:
* MSP-EXP430G2 LaunchPad
This example code is in the public domain.
*/
void setup() {
// Open serial communications and wai... | /*
String replace()
Examples of how to replace characters or substrings of a string
created 27 July 2010
modified 2 Apr 2012
by Tom Igoe
Hardware Required:
* MSP-EXP430G2 LaunchPad
This example code is in the public domain.
*/
void setup() {
// Open serial communications and wai... | Fix typo in string termination | Fix typo in string termination
| Arduino | lgpl-2.1 | vigneshmanix/Energia,bobintornado/Energia,qtonthat/Energia,croberts15/Energia,danielohh/Energia,battosai30/Energia,cevatbostancioglu/Energia,dvdvideo1234/Energia,battosai30/Energia,danielohh/Energia,cevatbostancioglu/Energia,qtonthat/Energia,sanyaade-iot/Energia,radiolok/Energia,sanyaade-iot/Energia,martianmartin/Energ... |
7439aff0049d051f69a04aeb976d24defdd76be1 | arduino_code/arduino_code.ino | arduino_code/arduino_code.ino | const int buttonPin = 2;
int buttonState = 0;
void setup() {
Serial.begin(9600);
pinMode(buttonPin, INPUT);
}
void loop() {
int randNum = random(300);
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
Serial.println(randNum);
}
delay(500);
}
| const int buttonPin = 2;
int buttonState = 0;
void setup() {
Serial.begin(9600);
pinMode(buttonPin, INPUT);
}
void loop() {
int randNum = random(300);
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
Serial.println(randNum);
while(buttonState) {
buttonState = digitalRead(bu... | Update delay time for arduino button read | Update delay time for arduino button read
| Arduino | mit | darmbrus/plant-watering-tracker,darmbrus/plant-watering-tracker,darmbrus/plant-watering-tracker,darmbrus/plant-watering-tracker,darmbrus/plant-watering-tracker |
fd2631164b66d61a98ad4da6eac933c9e079acd7 | battery_indicator/battery_indicator.ino | battery_indicator/battery_indicator.ino | /*
Battery indicator on the TFT screen.
*/
#include <ArduinoRobot.h>
#include "RobotBattery.h"
RobotBattery battery = RobotBattery();
int bat_val_prev = 0;
void setup() {
// initialize the robot
Robot.begin();
// initialize the screen
Robot.beginTFT();
// Black screen
Robot.background(0,0,0);
... | /*
Battery indicator on the TFT screen.
*/
#include <ArduinoRobot.h>
#include "RobotBattery.h"
RobotBattery battery = RobotBattery();
int bat_val_prev = 0;
void setup() {
// initialize the robot
Robot.begin();
// initialize the screen
Robot.beginTFT();
// Black screen
Robot.background(0,0,0);
... | Clear the text before setting the previous value | Clear the text before setting the previous value
| Arduino | mit | theapi/arduino_robot |
ce36c4371ac1e23c51636b17a416177d2e922829 | arduino/fillbrick.ino | arduino/fillbrick.ino | //Pin connected to ST_CP of 74HC595
const int latchPin = 12;
//Pin connected to SH_CP of 74HC595
const int clockPin = 11;
////Pin connected to DS of 74HC595
const int dataPin = 13;
void setup() {
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void loop() {
// count from 2 (0... | //Pin connected to ST_CP of 74HC595
const int LATCHPIN = 12;
//Pin connected to SH_CP of 74HC595
const int CLOCKPIN = 11;
// Pin connected to DS of 74HC595
const int DATAPIN = 13;
// Number of pins
const int BOARDHEIGHT = 5;
// Delay
const int DELAY = 200;
void sendData(byte data) {
// 001010
for (int i = 0; i < b... | Add sendData func and diagonalLines test pattern | Add sendData func and diagonalLines test pattern
| Arduino | mit | MaxWofford/philbrick |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.