Now connect your USB mining device(s) to your Raspberry Pi.
If you're mining device is powered via USB (such as the Block Erupter USB, or Klondike1), you'll need to connect it to a powered hub, which then connects to the Pi. Mining devices which use external power should be happy with either direct or hub connection.
Once everything is connected, we'll need to find the address of each device. To List all serial USB devices, enter the following command:
- ls /dev/*USB*
You should see something like this:
The above shows two USB serial addresses; /dev/ttyUSB0 and /dev/ttyUSB1
We'll pass these to cgminer using the "-S" parameter.
We'll pass these to cgminer using the "-S" parameter.
To start cgminer running as a background process using Block Erupter USBs, enter the following command:
- sudo nohup ./cgminer-3.1.1/cgminer --config /home/pi/cgminer.conf -S /dev/ttyUSB0 -S /dev/ttyUSB1 >/dev/null 2>&1&
Replace "/dev/ttyUSB0" and "/dev/ttyUSB1" with your device addresses
For other types of USB miners, check out the cgminer README files to determine which parameters to use and include them in the following format (and remove the curly braces!):
- sudo nohup ./cgminer-3.1.1/cgminer --config /home/pi/cgminer.conf {add parameters here!} >/dev/null 2>&1&
We'll be using the cgminer startup command later on to configure auto-start. If you customized it, be sure to paste a copy of it into a scrap text document for later reference.
If you're using USB Block Erupters, you should see the green idle LEDs turn off at this point, indicating that cgminer has started using them.
Now start PiMiner as a background process by entering the following command:
- sudo python PiMiner/PiMiner.py &