-
Download the Arduino IDE, tested with 1.6.7 on OSX and Windows only but Linux should also work.
-
Start the IDE and from the menu, Preferences, add the following to "Additional Boards Manager URLs" https://redbearlab.github.io/arduino/package_redbear_index.json
-
From the menu, Tools > Board, select "Boards Manager" and install the RedBear Duo board support package to the IDE.
-
Connect the Duo to your computer through the USB port of the Duo. Note that, it is not the RBLink's USB port if you are going to use the RBLink for Grove System components, the following photo shows the setup (connected to Grove RGB LED):
-
From the menu, Tools > Board, select RedBear Duo under RedBear IoT Boards.
-
Select the Port under the Tools menu.
Original article could be read here.
Help to write functions very quickly. This feature is known as lambdas in other language.
ES5:
Have you experienced opening new installed app on mac osx and got "Verifying blabla.app" message? It will be troublesome if you got stuck waiting the verifying process done. In order to ignore this check, you need to bypass Gatekeeper in osx. Just try this, open a terminal and run the command below:
$ cd /Applications
$ xattr -d com.apple.quarantine blabla.app
ACTION = build | |
AD_HOC_CODE_SIGNING_ALLOWED = NO | |
ALTERNATE_GROUP = staff | |
ALTERNATE_MODE = u+w,go-w,a+rX | |
ALTERNATE_OWNER = grantdavis | |
ALWAYS_SEARCH_USER_PATHS = NO | |
ALWAYS_USE_SEPARATE_HEADERMAPS = YES | |
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer | |
APPLE_INTERNAL_DIR = /AppleInternal | |
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation |
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin 1.0
Kotlin project website is at kotlinlang.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
This is a quick guide to Kotlin programming language. The previous part of this guide is here
#Object Oriented
fun main(args : Array<String>) {
class local (val x : Int)
val y = local(10)
println("${y.x}")
#Control Structures
##If statement
Kotlin if statement should look familiar with other language
fun main(args : Array<String>) {
val total = 10
Pushes the destination view controller onto the navigation stack, moving the source view controller out of the way (destination slides overtop from right to left), providing a back button to navigate back to the source - on all devices Example: Navigating inboxes/folders in Mail
Replaces the detail/secondary view controller when in a UISplitViewController with no ability to navigate back to the previous view controller Example: In Mail on iPad in landscape, tapping an email in the sidebar replaces the view controller on the right to show the new email