Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gamgoon's full-sized avatar
🌈
!!

gamgoon gamgoon

🌈
!!
View GitHub Profile
Button buttonRed = (Button) findViewById(R.id.buttonRed) ;
buttonRed.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View view) {
textView1.setText("Red") ;
textView1.setBackgroundColor(Color.rgb(255, 0, 0));
}
}) ;
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@gamgoon
gamgoon / l298n-sample.c
Last active October 16, 2015 01:57
L298N Dual Motor Controller Module and Arduino
const int IN1 = 7;
const int IN2 = 8;
const int ENA = 9;
void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENA, OUTPUT);
}