henkoegema
New Member
I have compiled and flashed (successfully) following program to the atmega328P (connected to a raspberry pi, MOSI-MISO-....).
This program reads a voltage on pin A0
I only use the command line in the raspberry pi. (no GUI)
When I've flashed the program I get the command prompt back. So far, so good.
Q: How do I read the values of the program in the atmega328p back into my raspberry pi?
(How I flashed it: $avrdude -p m328p -c gpio -e -U flash:w:build-cli/Arduino.hex)
This program reads a voltage on pin A0
Code:
const int analogInPin = A0;
float sensorValue = 0;
void setup(){
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(analogInPin);
Serial.print(¨Voltage Output = ");
Serial.print(sensorValue*5/1023);
Serial.println(" ");
delay(100);
}
I only use the command line in the raspberry pi. (no GUI)
When I've flashed the program I get the command prompt back. So far, so good.
Q: How do I read the values of the program in the atmega328p back into my raspberry pi?
(How I flashed it: $avrdude -p m328p -c gpio -e -U flash:w:build-cli/Arduino.hex)
Last edited: