PiMiner

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jnelson
 
Posts: 5
Joined: Wed Aug 13, 2014 1:19 pm

PiMiner

Post by jnelson »

I just set up a RPi to mine BANNED. Having some difficulty with PiMiner.py

When I run it, I get

$ sudo python PiMiner/PiMiner.py &
[1] 2681
$ Traceback (most recent call last):
File "PiMiner/PiMiner.py", line 30, in <module>
b = lcd.button()
AttributeError: 'Adafruit_CharLCDPlate' object has no attribute 'button'

Since I haven't had the chance to add Python to my list of known languages, I'm at a bit of a loss.

Any help?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PiMiner

Post by adafruit_support_rick »

Have you modified PiMiner.py at all? I don't see that statement at line 30. There is a similar statement at line 69, but it invokes 'buttons()', which is a legal attribute.

User avatar
jnelson
 
Posts: 5
Joined: Wed Aug 13, 2014 1:19 pm

Re: PiMiner

Post by jnelson »

It was failing to find the network, so I removed that code for the time being.

So I change the line as suggested and
$ sudo python PiMiner/PiMiner.py &
[1] 2681
pi@bcminer1 ~ $ Traceback (most recent call last):
File "PiMiner/PiMiner.py", line 30, in <module>
b = lcd.buttons()
AttributeError: 'Adafruit_CharLCDPlate' object has no attribute 'buttons'

Makes no difference.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PiMiner

Post by adafruit_support_rick »

Very strange. Adafruit_CharLCDPlate defines 'buttons' at line 458:
https://github.com/adafruit/Adafruit-Ra ... CDPlate.py

User avatar
jnelson
 
Posts: 5
Joined: Wed Aug 13, 2014 1:19 pm

Re: PiMiner

Post by jnelson »

Intriguing. My copy of that file only has 437 lines. I'll download that and install it tomorrow. I'll let you know how it goes.

Mind you, the copy I have I got from the link provided in the tutorial.....

User avatar
jnelson
 
Posts: 5
Joined: Wed Aug 13, 2014 1:19 pm

Re: PiMiner

Post by jnelson »

So, after cloning https://github.com/adafruit/Adafruit-Ra ... n-Code.git to my little miner, my initial issue has been resolved.

Went back and looked. Did not find that link anywhere in Adafruit's PiMiner Raspberry Pi BANNED Miner tutorial. Perhaps it should be added. The link I did find was from building the display itself.

Anyway, now it is hanging at connecting to cgminer. I'm using, at the moment, cgminer-4.4.2. cgminer itself is working, as mining is occurring. Perhaps there is a config option I need to set.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PiMiner

Post by adafruit_support_rick »

I'll look into the tutorial. Not sure about the hang - I'lll have to ask somebody about that.

User avatar
jnelson
 
Posts: 5
Joined: Wed Aug 13, 2014 1:19 pm

Re: PiMiner

Post by jnelson »

As an update, it was a configuration issue, sort of.

From the README
api-listen Enable API, default: disabled

It would seem that the opposite of "disabled" is "true". Somewhat non-obvious.

In any case, it's all working now.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PiMiner

Post by adafruit_support_rick »

Glad you found it!

User avatar
fsteddie
 
Posts: 1
Joined: Fri Feb 20, 2015 1:12 pm

Re: PiMiner

Post by fsteddie »

Hello,

I too followed the tutorial and got the same results. I also cloned the git repository in this help file and I also have the hanging "connecting to cgminer" when I rebooted the Pi.... What was the fix? I cannot find the instance where I need to enable the api in any of the files. Could you be more specific as to which file you enabled the API?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: PiMiner

Post by adafruit_support_mike »

The 'api-listen' item should be in the file cgminer.conf

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”