This blog post is a continuation of my previous blog posts exploring Swift on the Raspberry Pi platform. In my previous adventure, I implemented controlling an LED attached to a Raspberry Pi through…
Stefan Vorkoetter is a hobbyist with very specific tastes in his electronics. Though a software developer by day, he didn’t get a…
Ho sempre voluto poter comandare le mie apparecchiature elettroniche e multimediali con un sistema semplice e flessibile, che potesse essere facilmente installabile e configurabile. Dopo aver lavorato tanto con i PIC e aver provato Arduino, ho trovato la soluzione definitiva: il L’ultimo modello di Raspberry Pi attualmente in commercio è il Raspberry Pi 3.
Trust no one and build a server that encrypts your Web data from prying eyes.
Android Auto on Raspberry Pi: Recently my news feeds been filling up with android auto on raspberry pi, so i decided to investigate and attempt to install it on my raspberry pi. i have also made a install script that will help you guys with installing android auto as well. thank…
“CatSpberry 2” is a toy forklift controlled by raspberry pi “CatSpberry 2” have 3 dc motors controlled with L9110 motor conteroller (datasheet L9110) but you should use my …
A criatividade não tem limites e a tecnologia de hoje pode ser usada para revitalizar o que no passado era o moderno, era a tecnologia de ponta em... diversão. Foi assim que André Lopes...
Big-time gaming in a little Pi package.
Android Auto on Raspberry Pi: Recently my news feeds been filling up with android auto on raspberry pi, so i decided to investigate and attempt to install it on my raspberry pi. i have also made a install script that will help you guys with installing android auto as well. thank…
As humans, we are genetically inclined to enjoy the company of our own kind; however, this often includes welcoming cats, dogs, and other domesticated animals into our fold. Pet lovers...
Hello! I have spent some time lately trying to find a solution to get my 7 inch eGalax touchscreen to work with Raspbian(Debian Wheezy) in XBMC 12 Frodo and finally got it working as I wanted. My Setup Raspberry PI model B: ~30$ 7 inch display with touchscreen for car rear view camera, from eBay(touchscreen is connected to one USB port): 80$ HDMI male to HDMI male connector(from eBay): <2$ 4GB SDHC class 4 card 12V(500mA) AC to DC adapter for powering the display 5V(1A) microUSB AC to DC converter for powering the PI USB keyboard Edit: Download the latest image from the top right corner of this blog(username: pi, password: a). Here is what you need to do in order to have a system with Raspberry PI, Raspbian OS and XBMC 12 Frodo stable with eGalax touchscreen working correctly(which means axes calibrated and click working with just one tap&release action): 1. Get latest Raspbian image from here and flash it to an SD card. 2. Build your own kernel with eGalax touchscreen support, like in this post(you will only need to replace kernel.img file and /lib/modules and /lib/firmware folders on the SD card). 3. Build XBMC 12 on Raspberry PI using this tutorial. Note: After downloading XBMC archive, get this archive and unpack it anywhere. Apply patches to xbmc files: cd patch -p1 /xbmc/input/linux/LinuxInputDevices.cpp < LinuxInputDevices_cpp.patch patch -p1 /xbmc/input/MouseStat.cpp < MouseStat_cpp.patch patch -p1 /xbmc/input/MouseStat.h < MouseStat_h.patch 4. Touchscreen calibration. Create a new file /home/pi/touchscreen_axes_calib on Raspberry PI. It will contain four values for the axes calibration and one value for swapping axes. The simplest way to swap axes is to switch the four wires cable plug's orientation which comes from the touchscreen to the touch controller. Here is how the calibration was done. the original behavior(no calibration) In the picture above, we see that "touch panel values frame" differs from "touch panel physical size frame". When we are pressing the touch we are moving in the "touch panel physical size frame" but when the touch screen is not calibrated the arrow from XBMC is in another place. "touch panel physical size frame" is the screen starting from (0,0) on the left top corner and going to (width, height) in the right bottom corner. "touch panel values frame" is the frame which contains all the number the touch controller is giving. We see that these frames differs a lot. Our main scope is to overlap the "touch panel values frame" to the "touch panel physical size frame". In order to do this we need to do three steps(the third one is done in software): a. Scale the value read from the touch driver x and y) in order to fit 0->width range and respectively 0->height range of the "touch panel physical size frame" the scale value for x axis is: "touch panel physical size frame" width calib_x_fact = ------------------------------------------------- "touch panel values frame" width "touch panel physical size frame" height calib_y_fact = ------------------------------------------------- "touch panel values frame" height "touch panel values frame" width and height are coming from your XBMC resolution(I have width=1280 and height=720). "touch panel physical size frame" width and height are a little more trickier to find but nothing hard. In step 2 above, you have calibrated the touchscreen in XFCE. You got some values returned by xinput_calibrator, something like: Section "InputClass" Identifier "calibration" MatchProduct "eGalax Inc. USB TouchController" Option "Calibration" "1977 32 1893 131" EndSection In my case, "touch panel physical size frame" width is 1977 - 32 = 1945 "touch panel physical size frame" height is 1893 - 131 = 1762 Now, compute the values and put them in /home/pi/touchscreen_axes_calib file b. Translate the "touch panel values frame" to the left and up, to match "touch panel physical size frame". I didn't find a logical method to do this, because we don't know exactly "where is" the "touch panel values frame", so, in order to find calib_x_d and calib_y_d you have to first set them both to zero and then start XBMC. Now, put some sharp pointer on the screen and observe the distances between the cursor on the screen and your pointer's position. Try to approximate these x and y deviations(measured in pixels) and put them in the /home/pi/touchscreen_axes_calib file. c. Revert direction of axes. This is done in the software(from patches). 5. Math behind. To accomplish these transformations the following formula was implemented in the file xbmc/input/linux/LinuxInputDevices.cpp pointer.x = value_read.x * calib_x_fact + calib_x_d; pointer.y = value_read.y * calib_y_fact + calib_y_d; After I have successfully calibrated the touchscreen I have discovered that single click was not possible from the touchscreen, just double click. After digging through the code, I have found that this was caused by drag action which was triggered because the previous values of the touch were far(more than 5 pixels) from a new press. For example, at the start of the program, cursor is set at 0,0 coordinates; if user is trying to press a button, let's say at 100, 300, the program(XBMC) will calculate the distance between these two points and will find out that this is greater than 5. Pythagorean theory: (100-0)x(100-0) + (300 - 0)x(300-0) is greater than 5x5 XBMC will treat this as a drag event. This drag issue is not caused when you double click, because the previous point in the second click action is very close to the second click point. This also works for mouses, because the previous value of the pointer is always very close to the new value of the pointer(because mouse's pointer drags on the screen and it doesn't jump - so each new value is very close to the previous one). I have developed an algorithm to avoid this issue: When the user is pressing the screen(x,y), the touch values are being set to (screen_width+1, screen_height+1 -> outside of the visible screen) just at the first event read(which is BTN_TOUCH PRESS). After this event, the program will receive multiple X and Y absolute values events. The first two events, one for X and one for Y are used to set the previous X value, respectively previous Y value to the current X respective current Y values. And from now on distance is measured and this is preventing no unwanted drag action. The user's finger/pointer will not stay at a single point, because the touchscreen's lack of precision, so it will move around 5-6 pixels in x and y directions. I have also set the click distance to 7. You can change this by changing click_confines value in xbmc/input/MouseStat.h. Originally it was set to 5, but this is not very good for touch screens(I had to click with a sharp pointer and with my nail always, but with a value of 7 I can click with my finger with a slight touch -> really nice). Enjoy!
MSG can now switch between Windows 10 and Debian Linux.
Unlock the world of Raspberry Pi automation! Learn how to control a relay for lights, motors, and more with this easy-to-follow guide. No electronics experience needed!
OpenEnergyMonitor provides open-source energy monitoring tools that help people understand and regulate their energy use and energy systems.
This homebrew Raspberry Pi 3B underwater drone will search the waters for sunken treasure, or, y'know, bits of trash and stuff.
http://reviews.cnet.co.uk/desktops/how-to-make-a-raspberry-pi-solar-powered-ftp-server-50009923 Computers You've set up your Raspberry Pi using our easy to follow instructions. You've had a gander at our 25 top fun things to do and now you fancy something a bit more involved. How about making a solar-powered FTP server? You'll always have instant access to all your digital files, from anywhere with an Internet connection, and it won't cost a penny on your electricity bill. Ordering the sun bed We'll be using a simple custom-built £25 Raspberry Pi case, with all the right slots for its outputs, that comes with a small solar panel, a battery case and a micro-USB cable. You'll just need to supply your own NiMH rechargeable batteries. Point your browser over here -- you'll find all the information you need to place an order via PayPal. The maker, Cottonpickers, has an eBay page as well if you're more comfortable making your purchase that way. Static IP address Once it's plopped through your letterbox, slot your Pi into the case and hook it up to power and a monitor. Let's start programming. The first step is to make sure the RPi has a static IP address, as we're going to have to poke a hole through our network firewall to allow incoming FTP requests. In the RPi desktop, double-click the 'LX Terminal' icon to drop into the Terminal. To setup a static IP address, type the following: sudo nano /etc/network/interfaces This file controls the IP addressing for the RPi. All you need to do is scroll down slightly to the 'iface eth0' line and remove 'DHCP' and replace it with 'static'. Now, on the line directly below, enter an IP address for your RPi, along with the subnet mask and gateway. Our example looked like this, but yours will be dependent on your home network: address 192.168.1.93 netmask 255.255.255.0 gateway 192.168.1.254 Assuming you don't know these already, you can find your IP address and router settings by consulting your router documentation, or by typing the following into a Terminal on the RPi: ifconfig -a. This will list the current IP address, netmask and gateway as configured by the router's DHCP. All you need to do then is enter the IP address and so on into the 'static' section of the file to make sure the RPi will forever boot with that unique IP addess. After you've entered the details, exit by pressing Ctrl+X to exit, followed by 'Y' to accept the changes, then press Enter a couple of times to get to the command line. Now type: sudo /etc/init.d/networking stop sudo /etc/init.d/networking start This will restart the networking components with the new IP address in place. VNC From the Terminal type the following, pressing Enter after each line: sudo apt-get update sudo apt-get install vnc-server vncserver When the packages have downloaded and installed, follow the instructions on-screen to setup a password, and confirm it, but answer 'No' to the view-only option. Now that VNC is installed, we need to make sure it loads up as a service every time the RPi reboots. To do this, from the Terminal type: sudo nano /etc/init.d/tightvncserver, and press enter In the editor, type the following: #!/bin/sh # /etc/init.d/tightvncserver # Set the VNCUSER variable to the name of the user to start tightvncserver under VNCUSER='pi' case "$1" in start) su $VNCUSER -c '/usr/bin/tightvncserver :1' echo "Starting TightVNC server for $VNCUSER " ;; stop) pkill Xtightvnc echo "Tightvncserver stopped" ;; *) echo "Usage: /etc/init.d/tightvncserver {start|stop}" exit 1 ;; esac exit 0 Now press 'Ctrl+X', then 'Y' to save, followed by 'Enter' a couple of times to get you back into the Terminal. What we need to do now is edit the permissions of the script we've just created so that it's executable, do this by typing in: sudo chmod 755 /etc/init.d/tightvncserver, and press Enter. Finally, we need to add it to the start-up scripts, by typing: update-rc.d tightvncserver defaults, and press Enter. What you can do now is unplug the RPi from your monitor and locate it somewhere that has easy access to a network cable, and plenty of sunlight (for the solar cells). If you install the likes of TightVNC Viewer you should be able to point the client to '192.168.1.93:1' (or whatever your static IP address is) and have full access to the RPi and the GUI. VSFTPD This next part involves setting up the FTP server itself. Again it's not too difficult, and can be configured to your exact preferences later on. From the Terminal, type the following: sudo apt-get install vsftpd, and press Enter. Once the VSFTPD (which stands for Very Secure FTP Daemon) packages have downloaded and installed, type: sudo nano /etc/vsftpd.conf, and press Enter. This is the configuration file and control for VSFTPD, it allows you to set all sorts of restrictions and policies, so some care is advised. To start with though, we would recommend altering the following lines within the script, either by un-hashing, or typing in 'YES' or 'NO': Anonymous_enable=NO Write_enable=YES Local_enable=YES Ascii_upload_enable=YES Ascii_download_enable=YES The full explanation can be found within the hashed comments in the script itself, but they will suffice for our little project for now. When ready, rave the changes to the script as before. Finally, reboot the RPi to bring everything you've done so far into effect. To do this, make sure you're in the Terminal, and type: sudo reboot, and press Enter. Access external hard drive via FTP We like to make things easy, so here's our method of accessing an external hard drive attached to one of the RPi's USB ports, via an FTP client. First, you can hook up an external USB drive to your PC and format it as NTFS, with the volume labelled FTP. When that's complete, plug it in to the RPi and via VNC click 'Yes' to view the drive from within the File Manager. Make a note of the address of the hard drive -- in our case it came out as /media/FTP. To test FTP access, install an FTP client such as FileZilla and enter the connection details: 192.168.1.93/media/FTP, replacing the IP address with your own static RPi address. Username: pi, replace this with the username you set VSFTPD with (default is pi). Password: raspberry, replace this with user's password (if other than pi). With luck, you should now have access to the external USB hard drive, via FTP, internal to your own network. External access The final part of this project involves granting external FTP access to the RPi. This is also the most ambiguous of the steps, as it all depends on the make and model of your router. For example, on the basic BT model I used it's a simple case of selecting FTP from the pre-defined applications, and assigning it to the internal IP address of the Raspberry Pi. Yours may be completely different, however. That being the case, please consult your router's documentation, or Google the model and see if there's already an FTP external access tutorial out there.
This is done in Mosaic Crochet. The pattern is fully written out for every round, and a chart is included. There are also pages formatted for printing out the chart if desired. Please contact me with errors or questions. My final throw ended up being 46” square, but hook size, or yarn can make this number vary. Gauge is not important for this project.
OpenHAB is a mature, open source home automation platform that runs on a variety of hardware and is protocol agnostic, meaning it can connect to nearly any home automation hardware on the market today.
Limerick area photographer and camera hacker, Dave Hunt, has managed to squeeze a Raspberry Pi SBC inside a detachable battery grip for his Canon 5D Mark II DSLR camera.
MSG can now switch between Windows 10 and Debian Linux.
Brisk business for Navio team down at Indiegogo
Make this impressive Raspberry Pi all-in-one PiPad which is usable, portable, and Linux based.
While we know and love the Raspberry Pi Zero — and its WiFi-enabled cousin the Zero W — if you order one expecting it to do something by…
Build Your Own Mini Arcade Cabinet With Raspberry Pi: The Porta-Pi Mini Arcade is a desktop-sized, fully functional, mini arcade cabinet measuring just under 13 x 9 x 10 inches (HxWxD). This Porta-Pi Arcade turns your Raspberry Pi in a mini arcade machine. Of course you could stuff any other retro co…
One of the reasons I was excited to play with the Pi was the rank of pins on one of its corners, the ‘low-level peripheral’ pin-out. GPIO pins, SPI, I2C and even an onboard 3.3v serial …
Like all good stories, this one starts with a fantastic vintage find at a local electronics flea market. Imgurian Iafan was perusing the…
Forget the Pelican case.
Build a mini Raspberry Pi server with a built-in UPS and OLED stats display. This is perfect for a NAS, media centre or home automation hub
Reversing the Process to Read TRS-80 Floppy Disks The Catweasel is an add-on card for the PC which allows reading TRS-80 floppy disks. It works by emulating a floppy disk controller using a combination of hardware and software. At the very start of the current project I believed that similar functionality would be possible by reversing the input and output signals and connecting a TRS-80 floppy drive to the interface board. Just recently I have succeeded in doing this Interface Card This picture of the device shows the interface board on the left and the floppy drive connector on the right. The interface board plugs into the top of the Raspberry Pi and the floppy card edge connector plugs into the TRS-80 floppy disk drive. The logic analyzer plug is for testing and development only and is not required for operation. Raspberry Pi The Raspberry Pi is pictured to the left. The Pi contains connectors for a keyboard, mouse, monitor and network. The operating system on the SD card is Raspbian which is based on Debian Linux. The interface board sits on top of the Pi during use. It is about the same size as the Raspberry Pi. No PC or Mac is required as this is a complete standalone computer system. Complete Device The complete device is shown to the left plugged into the Raspberry Pi and with the floppy cable plugged into an old TRS-80 floppy disk drive. Technical Details I used the same pins as in the original device but rewired so inputs become outputs and vice versa with one exception. The original card connected the Raspberry Pi SPI output pin to the expansion interface floppy data input line. This project needs to connect the Raspberry Pi SPI input pin (GPIO 9 - MISO) to floppy disk cable pin 30 to read floppy disk data into the Pi. To write data to the floppy disk you could connect SPI output pin (GPIO 10 - MOSI) to floppy disk cable 22 (WRITE GATE signal would also have to be connected). I found during testing that enabling the internal pull-up resistor for GPIO 9 had no effect when SPI mode was enabled. An external 10k pull-up resistor solved the problem. Another minor issue is that, using the current pin connections, the floppy disk drive motor spins and the head is loaded during the Raspberry Pi boot since those pins seem to be output high during the boot process. I suspect that selecting different pins will solve that problem. In the meantime I use the wiringPi gpio utility during boot to set the desired pin configuration and I/O direction. (Note: solved with the use of pull-down resistors.) Software The initial version was written under Raspbian for the Pi and used both the WiringPi and the bcm2835 low level library. I had hoped to using WiringPi exclusively but the current state of the driver is insufficient for my needs. Reading from the SPI using WiringPi leaves gaps in the data and the methods to wait for edge detect are very slow and end up returning far too late to be useful. However, a lot of work is being done by various people to implement DMA for SPI in Raspbian and I hope eventually to make use of this work when it shows up in the standard releases. The software initializes the Pi GPIO pins and SPI interface then sets the correct output values to step the read/write head to the desired track. Once at the desired track it starts a high-priority thread which waits for the index signal and then reads an entire track of data in a single pass. It then processes the data and writes it to the DMK file format before stepping to the next track. A single-density 35 track floppy disk can be read in under 20 seconds using the initial version of the software. The software itself is essentially the Tim Mann cw2dmk utility rewritten to handle the input data after it has been tweaked to generate clock and data bits. In the absence of DMA support I use a data rate of approximately 3 MHZ which is sufficient for single density but would not handle double density. Signal Details This picture shows the raw data coming from the drive at the top and the SPI clock at the bottom. As you can see, the SPI clock is not synchronized with the data coming from the drive. This is to be expected since there is no mechanism to cause synchronization and the SPI clock divider is not granular enough to allow a perfect match. In any case, it doesn't cause a problem. The main concern is to use a SPI clock rate fast enough to avoid missing clock or data pulses that extend into the 'dead zone' between SPI bytes. The SPI interface will not see pulses that fall inside the gap between bytes so I increase the clock rate to a little over 3 MHZ and I find that a single clock or data bit from the disk drive is received as 2-3 bits through the SPI interface. Worst case, if a clock or data bit exactly straddles the gap between bytes I would expect to see a single bit set in the output. The software counts the number of zero bits between the ones and, if the number of zero bits is greater than 16 it counts it as a zero, otherwise it counts it as a one. Because I am polling for the index signal in software there is a 10 microsecond gap between the start of the index signal and the start of data. This represents less than three clock/data pairs so is unlikely to cause problems. I have successfully read actual floppy boot disks into the Pi and used them in the TRS-80 emulator from www.trs-80emulators.com. While I was able to read some copy-protected disks into the Pi, not all of them worked correctly in the emulator. I believe this is because the cw2dmk utility was designed to make copies of unprotected disks and, by default, ignores misplaced address marks and other deliberate errors on copy protected disks. I have not tried to write back to a floppy disk but it should be easy to do so.
Interface an SRAM Bus to Your Arduino: Microcontrollers like the PIC and Arduino are great, but sometimes you need to store a large array of data and the internal memory just isn't enough, and that's where external memory comes into play. SRAM is generally easier to work with than dynami…
The Raspberry Pi is ideal for playing classic video games. Here's how to get started with retro gaming on your Raspberry Pi.
Raspberry Pi Powered Time Lapse Dolly (RasPiLapse): Here's my instructable for a home build timelapse dolly. The pro rigs for this are pretty pricey, so I made my own :) Please vote if you like this project!
Liz: today’s guest post comes from Gordon at IQAudIO, who makes and sells audio accessories for the Pi, which we really, really like – with one of his DACs you can turn your Pi into a proper audiophile-approved piece of kit. Gordon had made a project we really liked the look (and sound) of when we last […]