I found this useful Distribution | Username | Password —————|————|————- Debian Squeeze | pi | raspberry Arch | root | root QtonPi | root | rootme Raspbian | pi | …
-
-
Compass This module lets you access the built-in electronic compass. Before using, the compass should be calibrated, otherwise the readings may be wrong. Warning: Calibrating the compass will cause your …
-
Accelerometer This object gives you access to the on-board accelerometer. The accelerometer also provides convenience functions for detecting gestures. The recognised gestures are: up, down, left, right, face up, face …
-
Buttons There are two buttons on the board, called button_a and button_b. Attributes button_a A Button instance representing the left button. button_b A Button instance representing the right button. Classes …
-
WARNING: Preprocessor macros, although tempting, can produce quite unexpected results if not done right. Always keep in mind that macros are textual substitutions done to your source code before anything …
-
When we create a function, it must be given a name. The naming convention for functions is the same as for variables: •The function name can be made up of …
-
The most basic Arduino sketch consists of two functions called setup() and loop(). The Arduino IDE once installed has a basic example that shows this. Open the Arduino IDE and select …
-
An if statement can be followed by an optional else statement, which executes when the expression is false. Syntax The syntax of an if…else statement is [codesyntax lang=”cpp”] if(expression) { …
-
if, which is used in conjunction with a comparison operator, tests whether a certain condition has been reached, such as an input being above a certain number. If the expression …
-
The do loop works in the same manner as the while loop, with one difference in that the condition is tested at the end of the loop, so the do …
-
while loops will loop continuously, and infinitely, until the expression inside the parenthesis, () becomes false. Something must change the tested variable, or the while loop will never exit. This …
-
Arduino for beginners : for loops The for statement is used to repeat a block of statements enclosed in curly braces. An increment counter is usually used to increment and …
-
Here we show you how to create a custom image on the led matrix, we use the Mu editor [codesyntax lang=”python”] from microbit import * im = Image(‘99999:90009:90009:90009:99999:’) display.show(im) [/codesyntax] …
-
The MCP9808 digital temperature sensor converts temperatures between -20°C and +100°C to a digital word with ±0.5°C (max.) accuracy. The MCP9808 comes with user-programmable registers that provide flexibility for temperature …