• Announcements

    • MannDude

      Current state of vpsBoard   02/04/2017

      Dear vpsBoard members and guests:

      Over the last year or two vpsBoard activity and traffic has dwindled. I have had a change of career and interests, and as such am no longer an active member of the web hosting industry.

      Due to time constraints and new interests I no longer wish to continue to maintain vpsBoard. The web site will remain only as an archive to preserve and showcase some of the great material, guides, and industry news that has been generated by members, some of which I remain in contact to this very day and now regard as personal friends.

      I want to thank all of our members who helped make vpsBoard the fastest growing industry forum. In it's prime it was an active and ripe source of activity, news, guides and just general off-topic banter and fun.

      I wish all members and guests the very best, whether it be with your business or your personal projects.


Search the Community

Showing results for tags 'raspberrypi'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • vpsBoard
    • Announcements & Contests
    • Industry News
  • Virtual Private Servers
    • General Talk
    • Operating a VPS Business
    • Tutorials and Guides
    • Questions and Answers
  • The Lounge
    • The Pub (Off topic discussion)
    • Coding, Scripting & Programming
    • SBC, ARM, Home Automation
  • Marketplace & Reviews
    • Reviews
    • VPS Offers
    • Other Offers
    • Service Requests

Found 8 results

  1. Install required packages: sudo apt-get install hostapd dnsmasqSet static ip to your wlan interface: nano /etc/network/interfacescontent: (check for a single wlan0 entry!) iface wlan0 inet static address netmask a configuration to hostap: nano /etc/default/hostapdcontent: (add config file line): # Defaults for hostapd initscript # # See /usr/share/doc/hostapd/README.Debian for information about alternative # methods of managing hostapd. # # Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration # file and hostapd will be started during system boot. An example configuration # file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz # DAEMON_CONF="/etc/hostapd/hostapd.conf"If you are not sure what driver is needed check your usb devices (driver name will be disbplayed) lsusb -tlsusb -t /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M |__ Port 1: Dev 2, If 0, Class=vend., Driver=smsc95xx, 480M |__ Port 5: Dev 3, If 0, Class=vend., Driver=rtl8192cu, 480M Create hostapd.conf: nano /etc/hostapd/hostapd.confcontent: # interface for ap interface=wlan0 # driver of wlan stick driver=rtl871xdrv ctrl_interface=/var/run/hostapd ctrl_interface_group=0 # wlan ap configuration ssid=RaspberryPi channel=1 hw_mode=g ieee80211n=0 # wlan security wpa=2 wpa_passphrase=super-secure-password wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP rsn_pairwise=CCMP # country code country_code=US Add dnsmasq configuration: nano /etc/dnsmasq.confContent: (two important lines) # Configuration file for dnsmasq. # If you want dnsmasq to listen for DHCP and DNS requests only on # specified interfaces (and the loopback) give the name of the # interface (eg eth0) here. # Repeat the line for more than one interface. interface=wlan0 # Uncomment this to enable the integrated DHCP server, you need # to supply the range of addresses available for lease and optionally # a lease time. If you have more than one network, you will need to # repeat this for each network on which you want to supply DHCP # service. dhcp-range=,,,12h #set default gateway (if wanted) #dhcp-option=3, Restart services: sudo service hostapd restart sudo service dnsmasq restart Enable IP forwarding: nano /etc/sysctl.confUncomment: # Uncomment the next line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1Activate settings: sudo sysctl -p Setup forwarding rules: nano /etc/network/if-up.d/apforwarding && chmod +x /etc/network/if-up.d/apforwarding content: # !/bin/sh iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE iptables --append FORWARD --in-interface wlan0 -j ACCEPT Reboot your Raspberry Pi.
  2. They upgraded the Raspberry Pi Model B - called it B+. Same price tag with some neat features: They upgraded the GPIO header from 26 pins to 40 pins They doubled the USB 2.0 ports to 4. They changed the SD card adapter to Micro SD They replaced the linear regulators with switching ones to reduce the power consumption about 1W. They added a dedicated low-noise power supply for the audio circuit Nice looking one. They keep the old B model for fans but if you want to buy a Raspberry Pi - take the B+ one.
  3. Two really cool projects about a detailed map of the Raspberry Pi and the Arduino. Move the mouse over one electronic element and the map popups the name and description: Go to the RaspMap and the ArduMap.
  4. https://vimeo.com/87342051 Some LED animation just for fun :D
  5. This is the second part of my RaspberryPi tutorial series. You can find the first part You can find the second part We now create a sound board: This time we plit the power lines to make the wirering easier. Each button is connected to ground on the buttom side and connected to a line where a GPIO pin and a resistor (the 1k Ohm ones) are connected to the + power line. The buttons are connected to the GPIO pins #18, #22, #23, #24 and #25. The GPIO pin #17 is connected to the buzzer (PT-1504P). The buzzer itself is connected to the ground. If you like the colorful square buttons -> visit AdaFruit. Create a script (nano ~/board2.sh) with following content: #!/bin/bash echo enable pins 17,18,22,23,24,25 echo 17 > /sys/class/gpio/export echo 18 > /sys/class/gpio/export echo 22 > /sys/class/gpio/export echo 23 > /sys/class/gpio/export echo 24 > /sys/class/gpio/export echo 25 > /sys/class/gpio/export echo setting directions echo out > /sys/class/gpio/gpio17/direction echo in > /sys/class/gpio/gpio18/direction echo in > /sys/class/gpio/gpio22/direction echo in > /sys/class/gpio/gpio23/direction echo in > /sys/class/gpio/gpio24/direction echo in > /sys/class/gpio/gpio25/direction echo 0 > /sys/class/gpio/gpio17/value function callbeep { for (( i = 0; i <= $1; i++ )); do : do echo 1 > /sys/class/gpio/gpio17/value sleep 1 echo 0 > /sys/class/gpio/gpio17/value done } echo start loop while [ 1 ] do value1=`cat /sys/class/gpio/gpio18/value` value5=`cat /sys/class/gpio/gpio22/value` value2=`cat /sys/class/gpio/gpio23/value` value3=`cat /sys/class/gpio/gpio24/value` value4=`cat /sys/class/gpio/gpio25/value` echo $value1 - $value2 - $value3 - $value4 - $value5 if [ $value1 -eq 0 ] then callbeep 1 sleep 1 fi if [ $value2 -eq 0 ] then callbeep 2 sleep 1 fi if [ $value3 -eq 0 ] then callbeep 3 sleep 1 fi if [ $value4 -eq 0 ] then callbeep 4 sleep 1 fi if [ $value5 -eq 0 ] then callbeep 5 sleep 1 fi done echo "done" So what are we doing here? Initializing GOIP pins Setting the direction Ensure that the buzzer is deactivated (echo 0) Define the function "callbeep" which Loop $1 + 1 times: Enable buzzer Wait 1 second Deactivate buzzer Start endless loop to check buttons Read states of buttons Call method "callbeep" if button is pressed This time the buttons are connected to the power line +. So energy is floating as long as a button is pressed, because if it is pressed the circuit is grounded. That's it - the third part is finished. Hopefully you had some fun. Please add comments and/or suggestions - both are welcomed.
  6. This is the second part of my RaspberryPi tutorial series. You can find the first part We now add a third LED and a touch button. Full view on board: The third yellow LED is quite simple: Connect the cathode of the LED with the - power line Connect the anode of the LED to a resistor (1kOhm) Connect the GPIO #22 to the resistor The push button needs more wires because all inputs of the Raspberry Pi can only be managed with 3.3V. You can kill parts of the Raspberry Pi if you set any GPIO pin to input when it is connected to a 5V source! This is a reason why I like the Arduino because the Arduino can handle outputs and inputs with 5V. And that is one reason why each breadboard does have two power line sides - one for 5V and one for 3.3V. Second power line Connect the 3.3V pin to the + line Connect the ground pin to the - line Button Connect the top left side of the button to the + power line Connect the top right side of the button to a resistor (1kOhm) Connect the resistor to the - power line Connect the GPIO #25 to pin between the top right side of the button and the resistor If the button is pressed all pins are connected to each other. So the power starts at the 3.3V pin of the Pi, flows through the top left corner to the top right corner. Most of the engery cannot pass the resitor and is searching for "another" way - and finds the wire to the GPIO #25. If someone is listening on the value of the GPIO #25 he/she can check if the button is pressed. Because it is a mechanical button and you press them quite hard (in relation to its dimension) the button itself has some vibration that causes some "button pressed" values after the initial press. So we have to wait some time before we recheck if the button is pressed. At this point all tutorials point to Phyton, because it is easier to implement complex checks but I will stick to the bash. Create a script (nano ~/board.sh) with following content: #!/bin/bash echo enable pins 22,23,24,25 echo 22 > /sys/class/gpio/export echo 23 > /sys/class/gpio/export echo 24 > /sys/class/gpio/export echo 25 > /sys/class/gpio/export echo setting directions echo out > /sys/class/gpio/gpio22/direction echo out > /sys/class/gpio/gpio23/direction echo out > /sys/class/gpio/gpio24/direction echo in > /sys/class/gpio/gpio25/direction echo flash green LED echo 1 > /sys/class/gpio/gpio23/value echo 0 > /sys/class/gpio/gpio24/value echo start loop to check button at gpio 25 while [ 1 ] do value=`cat /sys/class/gpio/gpio25/value` echo value of button pin=$value if [ $value -eq 1 ] then echo 1 > /sys/class/gpio/gpio22/value echo flash yellow LED sleep 1 else echo 0 > /sys/class/gpio/gpio22/value echo deflash yellow LED sleep 1 fi done So what are we doing here? Export pins to user space Set direction of pins (out(put) and in(put) Enable green LED and disable red LED Start endless loop to check button read value of GPIO #25 check if it is 1 (because it is a digital pin) light yellow LED if it is 1 and disable yellow LED if it is 0 wait 1 second A short video of the button in action: https://vimeo.com/87405517 That's it - the second part is finished. Hopefully you had some fun. Please add comments and/or suggestions - both are welcomed. I have added a second picture with a free sight on the complete board on request.
  7. This is the start of my RaspberryPi tutorial series. I will start with the basic stuff first to ensure that everyone who wants to do electronic projects is able to to it with his RaspberryPi. All of my old electronic projects are based on the ATmega chips but it is much easier to build up a project with the Raspberry Pi because you have a full stack linux in the background if you need a bash, a network connection or higher programming languages like Javascript, Python or Ruby. If you want to start you should do yourself a favor and buy a breadboard: A breadboard helps to build prototypes fast because it does not require soldering to build connections. Additionally you need less wires to build up a circuit because most connections you want to build are allready provided by the breadboard. The power buses (+/-) are on the left and right side. So once ground is connected to - all other elements connected to one bus are connected to the ground to. Same with the power line. Between the power lines there are two separated areas where all points of one line are connected to each other. So if you put two elements in points of the same line they are connected with each other. That's it - you know what a breadboard does. So how does the whole setup look like? I use a Cobbler to connect my Raspberry Pi with the breadboard. It helps a lot because all wires stick to the board and don't knot on the Raspberry Pi. We should now look at the wires: Orange Grounds the - power line 2x Yellow Both yellow wires do connect the ground line to the cathode of each LED 2x resistors (brown/black/yellow/silver) 1kOhm +/-10% Both resistors connect the anode of each LED with the neighbor side of the breadboard They "protect" the LEDs to ensure that not too much power is transfered Greed and red Connect the Raspberry Pi pins #23 and #24 with the lines of the anodes of the green and red LED So what did we build? A circuit - a closed loop of energy. E.g. The power level of the pin #23 is set to HIGH, then the power is flowing through the resistor to the anode of the LED. The LED emmits light and the rest of the energy is going through the cathode of the LED to the ground of the breadboard and afterwards to the ground of the Raspberry Pi. Time to bring light to the LEDs. Open a ssh connection to the Raspberry Pi and sudo. All pins you want to use have to be exported to the userspace: echo 23 > /sys/class/gpio/export echo 24 > /sys/class/gpio/export A gpio looks like that: ls -al drwxr-xr-x 3 root root 0 Feb 22 23:30 . drwxr-xr-x 6 root root 0 Apr 9 2013 .. -rw-r--r-- 1 root root 4096 Feb 22 23:30 active_low -rw-r--r-- 1 root root 4096 Feb 22 23:30 direction -rw-r--r-- 1 root root 4096 Feb 22 23:30 edge drwxr-xr-x 2 root root 0 Feb 22 23:30 power lrwxrwxrwx 1 root root 0 Feb 22 23:30 subsystem -> ../../../../class/gpio -rw-r--r-- 1 root root 4096 Feb 22 23:30 uevent -rw-r--r-- 1 root root 4096 Feb 22 23:30 value Afterwards we have to define if the Raspberry Pi should send or receive from the pin: (we want to send = out) echo out > /sys/class/gpio/gpio23/direction echo out > /sys/class/gpio/gpio24/direction Now we can enable the pins: echo 1> /sys/class/gpio/gpio23/value echo 1> /sys/class/gpio/gpio24/value And disable them: echo 0 > /sys/class/gpio/gpio23/value echo 0 > /sys/class/gpio/gpio24/value This can be combined to a bash script: nano switchon.sh && chmod +x switchon.sh Content: #!/bin/bash echo enable pin $1 echo $1 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio$1/direction echo 1 > /sys/class/gpio/gpio$1/value Call it with the pin number as parameter: bash ~/switchon.sh 23 And the green LED is shining. That's it - the first part is finished. Hopefully you had some fun. Please add comments and/or suggestions - both are welcomed. The second part of this tutorial can be
  8. https://vimeo.com/87249046 So what did I build? My servers <-> Internet <-> Rapsberry Pi <-> Arduino <-> Shiftregister <-> blinking things Cronjob running a Ruby script This script does: Load list of ips and loop through list doing: Ping ip Try to login via ssh (key based) Check if other sessions are open Check if logfiles should be checked (logwatch report with bad words) Save short status to byte array Write this array to the EEPROM (512 bytes!!) of the Arduino (serial) Loop within Arduino Load array of status bits Loop through array For each item Increase counter and refresh digit display (count + 1) Check status of each byte Enable or disable LEDs So the digit display is showing which server status is currently displayed (0 to 9 - so 10 servers). The 6 LEDs (red/green/red/green/yellow/yellow) do show: Ping status (red bad / green good) Service status (red bad / green good) [if every required service is running or not] Other sessions are open (yellow) [so someone is playing around] Logstatus (yellow) [Hey I should look at those log files] I am still searching for a good 16 bit shift register (maybe the STP16C596A) and I want to add a 4x16 LCD module too. The Raspberry Pi is able to handle the stuff too but can only work with 3.3V input/output where the Arduino can handle 5V input/output. It is a pain to work with resistors for each single GPIO of the Raspberry Pi: And - of course - you save a lot of energy because the Arduino is more energy efficient. I like the idea of separated areas of responsibility: Raspberry Pi doing all the network and analysing stuff and Arduino doing all the electro-technics. I toy with the idea of buying a USB hub to connect several Arduinos with one Raspberry Pi. One Arduino for the LCD/LED stuff One Arduino for the temperature/light/movement stuff One Arduino for a touch button pad - each button for one action like ssh login and calling scripts, etc. Yup your right - I am currently running riot on this electro stuff. Edit: Added video link.