[SOLVED] Can't Seem to Program Arduino Uno

I can definitely confirm that I do not seem to have any compatible serial ports. Here is what I get when running:

sudo python /home/brewpi/autoSerial.py

All ports:
/dev/ttyACM0 - Arduino Uno, VID:2a03, PID:0043
/dev/ttyAMA0 - ttyAMA0, VID:None, PID:None
Compatible ports:
Selected port: (None, None)

Now I am just not sure where to go next. Searched boards for answers. No luck.

What kind of Arduino do you have?

The problem is that your PID/VID is not in the list of compatible devices.

It is an official Arduino Uno R3.

Ah, this is due to the ugly fight between Arduino/Genuino. The founders split the company.
Arduino.org uses the VID that you have. It is different from Arduino.cc

I have updated the script to recognize the Arduino.org VID too now.

I have the same issue, but de output from autoserial.py is quite different.

python autoSerial.py
All ports:
/dev/ttyUSB0 - USB2.0-Serial, VID:1a86, PID:7523
/dev/ttyAMA0 - ttyAMA0, VID:None, PID:None
Compatible ports:
Selected port: (None, None)

is it possible to change anything in config files by my self?

Thanks!

UPDATED: I put one more line in autoserial.py and now both PI and arduino can talk

{ā€˜vid’: 0x1a86, ā€˜pid’: 0x7523, ā€˜name’: ā€œunoā€}

1 Like

Everything works!!! That seems to have done the trick. Can’t thank you enough. Time to begin the trial phase.

Were you able to get it up and running?

Almost…
Now rapspi recognize the arduino, and I can flash it. But… when I go to the ā€˜Device Configuration’ and press ā€˜Refresh Device List’ (with read values checked), the temp sensors doesnt appear. I check circuit (i ran a simple code to get the address and values, was ok), check the logs, many times and nothing.

  • Make sure the sensors are on pin A4
  • Make sure 5V is connected to the sensors, we ignore parasitically powered sensors, because they are not reliable.
  • Make sure you have a 4.7 kOhm pullup resistor. Not 1 per sensor, only one on pin A4.

Nothing… :-/
Changed the resistor, the wires, the power (and also reinstall the raspbian). Both relay (ports 5 and 6) was recognized (sounds ā€œclickā€ when I add).

But the temp sensors doesnt apear. I think the port A4 of arduino isnt OK…

I used the updater.py --ask like above and am on the legacy commit, but I am getting the following error when trying to program. This is a brand new clean install for 2 instances (clean linux install, and clean brewpi install). I have followed all the commands for running 2 arduinos. Any ideas?

Jun 20 2016 12:32:02 Opening serial port
Jun 20 2016 12:32:02 Notification: Script started for beer ā€˜My First BrewPi Run’
Jun 20 2016 12:32:12 Checking software version on controller…
Jun 20 2016 12:32:22 Warning: Cannot receive version number from controller. Your controller is either not programmed or running a very old version of BrewPi. Please upload a new version of BrewPi to your controller.
**** Arduino Program script started ****
Settings will not be restored
Devices will not be restored
Jun 20 2016 12:33:45 Opening serial port
Loading programming settings from board.txt
Checking hex file size with avr-size…
Program size: 26896 bytes out of max 32256
ERROR: could not find port in bootloader
Traceback (most recent call last):
File ā€œ/home/brewpi/chamber1/brewpi.pyā€, line 649, in
{ā€˜settings’: restoreSettings, ā€˜devices’: restoreDevices})
File ā€œ/home/brewpi/chamber1/programController.pyā€, line 163, in programController
return programmer.program(hexFile, system1File, system2File, useDfu, restoreWhat)
File ā€œ/home/brewpi/chamber1/programController.pyā€, line 274, in program
if not self.flash_file(hexFile):
File ā€œ/home/brewpi/chamber1/programController.pyā€, line 650, in flash_file
’ -C ’ + avrconf)
TypeError: cannot concatenate ā€˜str’ and ā€˜NoneType’ objects
Jun 20 2016 12:34:01 Opening serial port
Jun 20 2016 12:34:01 Notification: Script started for beer 'My First BrewPi Run’
Jun 20 2016 12:34:11 Checking software version on controller…
Jun 20 2016 12:34:21 Warning: Cannot receive version number from controller. Your controller is either not programmed or running a very old version of BrewPi. Please upload a new version of BrewPi to your controller.

I found out I had to kill the brewpi.py processes before the autoSerial.py would take affect. Just in case someone else runs into this. sudo python /home/USER/brewpi.py --kill

Also make sure you only have one Arduino connected while updating.

How did you edit autoserial.py?

Open terminal
cd /home/brewpi/autoSerial.py
sudo nano autoserial.py

That will open a text editor in the terminal window for you to make the needed changes.

1 Like

[quote=ā€œolywrestle, post:36, topic:1319ā€]
sudo nano autoserial.py
[/quote]Sill having problems opening up cd /home/brewpi/autoSerial.py
error =not a directory.
I can see what I think I need to edit at python /home/brewpi/autoSerial.py but don’t know how to edit the files.

Sorry, wrong syntax.

cd /home/brewpi
Then
Sudo nano autoserial.py

This is what I used to find the information on my uno
sudo python /home/brewpi/autoSerial.py
and then to edit the files
sudo nano python /home/brewpi/autoSerial.py
Hit Ctrl X and the file come up,edit files, then Ctrl O enter then Ctrl X