434
edits
Samthetechie (talk | contribs) |
Samthetechie (talk | contribs) (added some code) |
||
| Line 45: | Line 45: | ||
===Detailed milestones=== | ===Detailed milestones=== | ||
* Cost effective prototype | * Cost effective prototype | ||
* Working electronics | * Working electronics | ||
* Finalised physical design | * Finalised physical design | ||
* UI design | * UI design | ||
* Functional software for comms to nanode via bluetooth | * Functional software for comms to nanode via bluetooth | ||
* Making it go back back, forth and forth. | * Making it go back back, forth and forth. | ||
| Line 139: | Line 136: | ||
==Software== | ==Software== | ||
First attempt at some Arduino / Nanode / ATMEGA328 Code for the H-bridge control: [https://gist.github.com/1205051] | First attempt at some Arduino / Nanode / ATMEGA328 Code for the H-bridge control: [https://gist.github.com/1205051] | ||
===Brief=== | It looks something like this: | ||
#define EN_1_2 12 | |||
#define EN_3_4 7 | |||
#define INPUT_1A 11 | |||
#define INPUT_2A 10 | |||
#define INPUT_4A 8 | |||
#define INPUT_3A 9 | |||
void setup() | |||
{ | |||
pinMode(EN_1_2, OUTPUT); | |||
pinMode(EN_3_4, OUTPUT); | |||
pinMode(INPUT_1A, OUTPUT); | |||
pinMode(INPUT_2A, OUTPUT); | |||
pinMode(INPUT_3A, OUTPUT); | |||
pinMode(INPUT_4A, OUTPUT); | |||
digitalWrite(EN_1_2, HIGH); | |||
digitalWrite(EN_3_4, HIGH); | |||
} | |||
void loop() | |||
{ | |||
digitalWrite(INPUT_1A, HIGH); | |||
digitalWrite(INPUT_2A, LOW); | |||
digitalWrite(INPUT_3A, HIGH); | |||
digitalWrite(INPUT_4A, LOW); | |||
delay(10000); // wait for a second | |||
digitalWrite(INPUT_1A, LOW); | |||
digitalWrite(INPUT_2A, HIGH); | |||
digitalWrite(INPUT_3A, LOW); | |||
digitalWrite(INPUT_4A, HIGH); | |||
delay(10000); // wait for a second | |||
}===Brief=== | |||
===Screen layout=== | ===Screen layout=== | ||