Made things more consisten

Clearified docs
This commit is contained in:
Sebastian 2015-12-08 19:03:27 +01:00
parent 5de13e3cce
commit 485a6ded88
5 changed files with 12 additions and 10 deletions

View File

@ -1,6 +1,6 @@
AVRMCU ?= atmega8
F_CPU ?= 16000000
ISPPORT ?= /dev/ttyACM0
ISPPORT ?= /dev/ttyUSB0
VERSION = 0.1
@ -65,7 +65,7 @@ clean :
flash : all
avrdude -c arduino \
-p $(AVRMCU) -P $(ISPPORT) \
-U flash:w:$(OBJDIR)/$(TARGET).hex
-U flash:w:$(OBJDIR)/$(AVRMCU)/$(TARGET).hex
test : flash
screen $(ISPPORT) 38400

View File

@ -20,12 +20,14 @@ The makefile takes 3 optional parameters:
If you want to run the code on your Arduino try:
```
make AVRMCU=atmega32p
make AVRMCU=atmega32p flash
make AVRMCU=atmega32p ISPPORT=/dev/ttyACM0
make AVRMCU=atmega32p ISPPORT=/dev/ttyACM0 flash
```
Afterwards connect the encoder and start a terminal emulator of your choice on your serial interface.
Configure it for **38400** Baud, **8** Bit, **N**o Parity and **1** stop bit.
If you start sending newlines to the microcontroller, you should see it respond with measurements in plain ASCII.
If your are seeing binary garbage, you either have the wrong baudrate or degree_mode not set to 1.
You can also run cube_demo.py on this interface if you have PyOpengl and PySerial installed.
It might be necessary to change the SERIAL constant on line 16 to the correct interface.

View File

@ -64,7 +64,7 @@ def idle():
ser = serial.Serial(SERIAL, 9600, timeout=0.032)
ser = serial.Serial(SERIAL, 38400, timeout=0.032)
if not ser:
print "Unable to open serial port"
sys.exit(1)

View File

@ -5,7 +5,7 @@
#include "AS5043.h"
#include "uart.h"
const uint8_t degree_mode = 0;
const uint8_t degree_mode = 1;
int main(void) {

View File

@ -1,6 +1,6 @@
AVRMCU ?= atmega8
F_CPU ?= 16000000
ISPPORT ?= /dev/ttyACM0
ISPPORT ?= /dev/ttyUSB0
VERSION = 0.1
@ -63,9 +63,9 @@ clean :
@rm -rf $(OBJDIR)
flash : all
avrdude -c arduino \
-p $(AVRMCU) -P $(ISPPORT) \
-U flash:w:$(OBJDIR)/$(TARGET).hex
avrdude -c arduino \
-p $(AVRMCU) -P $(ISPPORT) \
-U flash:w:$(OBJDIR)/$(AVRMCU)/$(TARGET).hex
test : flash
screen $(ISPPORT) 38400