Skip to content

Instantly share code, notes, and snippets.

@chetankothari
chetankothari / dual_axis_three_ldr_sun_tracker.ino
Created October 23, 2016 18:05
Dual axis sun tracker using three LDR and Arduino Uno
#include <Servo.h>
#define NUM_PINS 3
int sensorPins[NUM_PINS] = {A0, A1, A2};
int sensorValues[NUM_PINS] = {0, 0, 0};
Servo lrservo;
Servo tbservo;

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@chetankothari
chetankothari / touchpadconf.sh
Last active August 29, 2015 14:01 — forked from tfg13/touchpadconf.sh
Touchpad configuration for the newer series of Lenovo ThinkPad laptops which do not have dedicated keys for mouse clicks. This will disable touchpad but the buttons can be clicked and that is what I wanted. The Left section is for Right click, the Middle section is for Middle click and the Right section is for Left click. Mouse navication is not…
#!/bin/sh
# these changes are not persistent, you may want to include this in your autostart
# disable the touchpad to prevent jittering when using the trackpoint
synclient AreaTopEdge=5000
#this will divide the touchpad as follows
# RRRRRR MMMM LLLLLL
# RRRRRR MMMM LLLLLL