Accessing The Hardware PWM Peripheral on the Raspberry Pi in C++ | Hertaville In this Blog entry I will demonstrate how to access the single hardware pulse width modulation (PWM) channel available on the Raspberry Pi. The BCM2835 SOC on the Raspberry Pi has two PWM peripherals; PWM1 & PWM2. Only the PWM1 peripheral can be mapped onto a GPIO pin (GPIO18) available on the RPi’s 26-pin header. It’s important to note that both the PWM1 & PWM2 peripherals are used by Raspbian to generate audio, so make sure that the RPI is not generating audio while accessing the PWM peripherals. Since Raspbian/ Linux already assigns the PWM peripherals for audio generation, there’s strictly no direct ‘proper’ way to access the PWM1 peripheral from userspace without accessing the hardware registers directly by ‘mmaping into /dev/mem’. The rpiPWM1 Class I developed C++ class ‘rpiPWM1′ that maps the PWM1 peripheral to GPIO18 and is able to control the PWM frequency, resolution, duty cycle and mode with ease. Here’s example code on how to use this class: Setting the PWM Frequency
GoPiGo plus GrovePi and Scratch - Dexter Industries Forum Hi, The GoPiGo has 4 ports on it: one each of Serial,I2C,Digital and analog. If you need to use more sensors, then adding GrovePi with the GoPiGo is recommended. The GrovePi does indeed work well with the GoPiGo. You might have to tinker around a bit to get the GrovePi Connected properly with the GoPiGo. The GoPiGo has an extra 28pin header for the Raspberry Pi. You can use both the Ultrasonic sensor and the line sensor and we have scripts written out for both. Do let us know how your project goes and if you end up creating and awesome line sensor robot please share it with us, we’ll be happy to share it with our users. -Karan
ArduiPi, the Shield that brings Arduino to Raspberry Pi – ArduiPi is a shield for Raspberry Pi that brings Arduino low level extented I/O to Raspberry Pi This project is now finished and the ArduiPi board available in Seeedstudio shop. Edit 03/17/2014 : New revision of ArduiPi board is now available, version is V1.1. The changes are : Added Auto-Reset Feature of Arduino from Raspberry Pi (connecting Pi GPIO 18 to FDTI DTR)Added a on board switch going to Pi GPIO 17 (mainly to be able to do clean shutdown of Pi )defaulted some PAD wire avoiding doing it to get started with the ArduiPi board. Here are pictures of new board Version 1.1 : Arduipi V1.1 back Pictures of Version 1.0 still available (front, back) Schematic of ArduiPi V1.1 (direct link) : ArduiPi V1.1 Schematic Old revision schematic (V0.9d aka V1.0) is available here Well, quite simple, Arduino is pretty cool but as soon you want to connect it to network, shield are quite expensive and web server will take lot of space into your Arduino and taking some functions off (such as SPI).
Raspberry PI Weather App (no hardware sensor) - CodeProject Introduction In this article we will be having a look into building a sample Weather App using Raspberry PI, Mono C# and RaspberryPi.Net (Mono.NET interface to the GPIO pins). Note – Consider this one as a starting point in getting your hands wet in writing a C# code snippet and running then same on PI. Hence we don’t make use of a hardware sensor but instead make use of web service to get the weather information. Below is the list of things that is required for this demo Weather App. Raspberry PI (Model A, B or B+). Background If you are a beginner to Raspberry PI, Please have a look into an excellent article by Guruprasad.K.Basavaraju which helped me understanding the basics. The following code is being reused and modified to work The first thing one has to do is register yourself and get the API Key from the below mentioned link History
RPi Low-level peripherals Back to the Hub Hardware & Peripherals: Hardware - detailed information about the Raspberry Pi boards. Hardware History - guide to the Raspberry Pi models. Low-level Peripherals - using the GPIO and other connectors. Expansion Boards - GPIO plug-in boards providing additional functionality. Screens - attaching a screen to the Raspberry Pi. Cases - lots of nice cases to protect the Raspberry Pi. Other Peripherals - all sorts of peripherals used with the Raspberry Pi. Introduction In addition to the familiar USB, Ethernet and HDMI ports, the Raspberry Pi offers the ability to connect directly to a variety of electronic devices. Digital outputs: turn lights, motors, or other devices on or off Digital inputs: read an on or off state from a button, switch, or other sensor Communication with chips or modules using low-level protocols: SPI, I²C, or serial UART Connections are made using GPIO ("General Purpose Input/Output") pins. Note that no analogue input or output is available. Links Useful P2 pins:
D3.js Tips and Tricks: Setting up remote access using TightVNC on a Raspberry Pi The following post is a section of the book 'Raspberry Pi: Measure, Record, Explore'. The entire book can be downloaded in pdf format for free from Leanpub or you can read it online here. Since this post is a snapshot in time. Raspberry Pi remote access To allow us to work on our Raspberry Pi from our normal desktop we will give ourselves the ability to connect to the Pi from another computer. To do this we need to install an application on our windows desktop which will act as a ‘client’ in the process and software on our Raspberry Pi to act as the ‘server’. Which you choose to use depends on how you feel about using the device. Remote access using SSH will be covered in the next post. Remote access via TightVNC The software we will install is called TightVNC. To install TightVNC for windows, go to the downloads page and select the appropriate version for your operating system. The ‘Select Additional Tasks’ selections can be left at their defaults. Then click on ‘Install’. #! #! #!
Using an Arduino as a slave I/O board Control a slave Arduino from your R-Pi via USB If you have used the GPIO pins and want to move on to analogue input and PWM (Pulse Width Modulation – pseudo analogue output) you need to add extra hardware to your Pi. I suggest you add an Arduino Uno as a first step. You use it as a slave to your R-Pi and control it from Python via a USB cable. Preparing the SD card You a need a 4 GB class 4 card (slow). Install setuptoolsYou need python setuptools to install nanpy on your card. Start Midori and type in the URL box Scroll down to the Linux instructions and then on to the downloads. Close Midori and you should see the egg file in the pi directory. Open the LX Terminal and type in: Code: Select all sudo sh setuptools-0.6c11-py2.7.egg This is a very quick installation. Install serialpyUsing Midori go to pyserial-2.6.tar.gzMake a temp folder and move the downloaded file into it.Using LXTerminal cd .. Testing #!
cypherkey/RaspberryPi.Net · GitHub .NET Microframework on RaspberryPi (Part 1) - Laurent Ellerbach - Site Home - MSDN Blogs I’m a bit fan of .NET Microframework (NETMF). NETMF is an open source technology originally developed by Microsoft based on .NET. It directly run on metal, without any OS. All sources and portability kit are freely available On Codeplex: And as a fan of Embedded devices I had to buy this inexpensive RaspberryPi I bought the version second revision with the network adaptor. In term of environment, it runs under Linux, it was a very long time I did not had to setup and make a Linux working. I was disappointed to see that NETMF is not on the platform. So what for access like we do in NETMF to the GPIO? And I just followed the steps explained on the RaspberryPi.Net project page. sudo apt-get update sudo apt-get install xrdp this second one will allow you to access your Raspberry thru RDP So you can do remote desktop on your Raspberry as you do with any other Windows machine. sudo apt-get install mono-runtime sudo apt-get install git . make cd