Friday, March 18, 2016

mount usb 2.0 stick HDD raspberry pi


sudo apt-get install ntfs-3g
sudo mkdir /media/usbdrive
sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sdb1 /media/usbdrive/


extra in /etc/fstab
/dev/sdb1 /media/usbdrive ntfs-3g uid=pi,gid=pi 0 0

Wednesday, March 09, 2016

Raspberry Pi Temperature & Humidity Network Monitor

Picture of Raspberry Pi Temperature & Humidity Network Monitor
IMG_2294.jpg
Please note that there's a Git repo for code at:
If you'd like the latest fixes or would like to contribute. Thanks Jonny Ervine!

I had some issues with Kingston SD Cards, but the SanDisk cards I'm using now have run for weeks without issues, so I'm changing the parts list to reflect that.
Also, after some 49 days, 16 hours, the display flatlines, as the reading routines start returning the same number over and over again. A reboot clears it, so just reboot once a month until I figure out what's up.

Over the past summer, my vacation home had a small water leak for three months, and I realized that had I been measuring the humidity in the effected area, I'd have
seen it go to 100% for a long time and I could have dispatched someone to fix the small problem before it became a big one.
And since I've been playing with Raspberry Pi computers for a while now, and saw an inexpensive temperature/humidity sensor on AdaFruit, I had all the pieces I needed
to implement an inexpensive network-connected monitor.
The Bill Of Materials (BOM):
1) Raspberry Pi Model B
2) Case
3) SD Card
4) Temperature/Humidity sensor
5 ) Power Supply (I use PoE splitters, but any 5V 1A Micro-USB supply will work)
I used the following exact parts, but obvious substitutions can be made to match local conditions and the state of your junk box. Shipping and the availability of bundles
may effect your final price.
$35.00 RPi http://www.newark.com/raspberry-pi/raspbrry-modb-...
$ 8.12 Case http://thepihut.com/products/classic-raspberry-pi... (5.99 Euros)
$ 6.99 SD Card (Sandisk, not Kingston)
$15.00 Sensor http://www.adafruit.com/products/393
$15.99 PoE Splitter http://www.newegg.com/Product/Product.aspx?Item=N...
And a few other miscellaneous things like hand tools, soldering iron, hot melt glue gun, small pieces of plastic wood, etc.
Step

Step 1: Physical assembly

Picture of Physical assembly
IMG_2300.jpg
IMG_2303.jpg
IMG_2307.jpg
IMG_2311.jpg
Split the case, find the hardware bag inside, and set the rubber feet aside for later.

Attach the Raspberry Pi to the case bottom with the supplied hardware.

Remove the GPIO knockout with a razor blade or Xacto knife and snap the two case halves together.

To keep the power dissipation of the power supply and Raspberry Pi from effecting the sensor readings, I cut a piece of Azek plastic lumber about 1.1 x 2.4 x 0.75 inches as a standoff.

Heat up your hot-melt glue gun and stack the parts as in the picture. You'll have a few seconds to make the alignment perfect before the glue sets, so get the alignment close before you press the parts together.  Be careful not to use so much glue that it extrudes from the edges of the seams or extrudes into the case, where it might interfere with the SD card connector.

1) Glue the sensor to the standoff

2) Glue the standoff to the top half of the case. Be careful not to block the LED cutouts on the one side or the ribbon cable cutout for the camera on the other side.

3) Glue the case bottom to the top of the PoE adapter. Make sure the "LAN Out" connector is on the same side as the Raspberry Pi Ethernet adapter.

4) Stick the 4 rubber feet to the bottom of the power adapter.

5) Ensure the voltage-output selection switch is set to 5V. Put a dab of hot-melt glue in the switch to prevent it from being changed and destroying your Raspberry Pi.

Step 2: Electrical Assembly

Picture of Electrical Assembly
IMG_2313.jpg
IMG_2314.jpg
IMG_2316.jpg
IMG_2319.jpg
The White wire from the sensor is a spare ground, and is not needed.  Cut it off inside the sensor case, being careful not to cut any of the other wires.

Braid the other three wires to keep them together, and cut them off about 3.5 inches long.

Prepare a 5-pin single inline female connector (cut from https://www.sparkfun.com/products/115 or equivalent), and solder the wires to it:

1) Red (+3.3V)
2) No Connection
3) No Connection
4) Yellow (Data)
5) Black (Ground)

Plug the connector into the GPIO on the Raspberry Pi so that pin 1 on the connector (red wire) is on pin 1 of the GPIO connector (label P1 on the board, upper right in the picture).  Note that the Red wire is on GPIO Pin 1 (+3.3V), the Yellow wire is on GPIO pin 7 (GPIO 4), and the Black wire is on GPIO Pin 9 (Ground).

Tuck the excess wire into the case.

Use a short CAT5 cable (something like http://www.monoprice.com/Product?c_id=102&cp_id=10232&cs_id=1023201&p_id=7505 ) to connect the LAN OUT on the PoE splitter and the Raspberry Pi Ethernet jack.  Twist it up to make it stay close to the case.

Take the PoE output cable and a Micro-USB connector or cable and solder them together.  If using an AdaFruit http://www.adafruit.com/products/1390 Micro-USB connector, wire it up as shown at http://learn.adafruit.com/assets/12402 , if using a cut-off cable, determine +5 and Gnd wires with a multimeter.  Note that the TP-Link wire with the white stripe is POSITIVE.

 

Step 3: Raspberry Pi software setup

Picture of Raspberry Pi software setup
Getting the basic Raspberry Pi software up and running has been documented elsewhere, but basically, go to:
http://www.raspberrypi.org/downloads
download the latest NOOBS (v1.3.2 as of this writing)
Format the SD card using the SD card tool at https://www.sdcard.org/downloads/formatter_4/
Unzip the NOOBS file and put the contents at the root of the SD card.
Insert the SD card into the Raspberry Pi
Connect a keyboard, monitor, mouse, and LAN cable to the Raspberry Pi and connect the power supply (when you plug the PoE splitter into the LAN cable, the Raspberry Pi will power up).

Select the Raspian distribution and install it.
While that's installing, select English-US keyboard, which autoselects US Keymap

On first boot, the raspi-config utility will run.
Select Console Login as the default on boot
Change Locale to en_US UTF-8
Set timezone for your location
Set keyboard to Generic 105-key, English US
Enable the camera
change the hostname to something memorable (I used 'rpithon' for Raspberry Pi Temp/Humid On Net)
set 16M memory split as we'll be running headless
Enable SSH
reboot

Now you can either continue to use the console or ssh to it from another machine.  From my Mac I can just say:
ssh pi@rpithon
and log in using the password 'raspberry'.  If your router doesn't do the DNS to help you find 'rpithon' then make note of the IP address on the console and use that instead.

Update everything (this will take a while):

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update

and reboot

Since this is going to be a LAN-only device, I get sick of playing "Mother May I?" with sudo, and I want to avoid any permissions problems with the additional software, so let's enable the root user and delete the pi user:

sudo passwd root
repeated twice
exit

log back in as root user (or ssh root@rpithon) using the password selected above

remove pi user:

deluser -remove-home pi

I prefer Emacs, and don't want all the X-Windows stuff, so:

apt-get install emacs23-nox

Tell it to check the disk (SD Card) every time it boots:

tune2fs -c 1 /dev/mmcblk0p6

emacs /etc/ssh/sshd_config

change X11Forwarding to no
UseDNS no
ClientAliveInterval 60

service ssh restart

Step 4: Setting up LAMP server (web server)

Picture of Setting up LAMP server (web server)
So we want to be able to see the graphs we'll be generating (below), so we need to install a LAMP server.

LAMP: /Linux/Apache/MySQL/PHP&Perl

Linux is the operating system you are using (Raspian is a version of Debian, which is one of the common flavors of Linux)
Apache is the name of the web server software
MySQL is a SQL (Standard Query Language) database interface.  Databases sound really scary, but they are easy to use for simple things once you get used to them.
PHP and Perl are programming languages that are commonly used with websites, though we'll be using the Raspberry Pi standard Python for graphing the data and 'creating' the website.

apt-get install apache2  php5 mysql-client mysql-server vsftpd

This takes a while to install.  Midway through it'll ask you for a MySQL password, pick one memorable, I'll use 'password' for this tutorial.

Now you should be able to browse to http://rpithon (or http:// if the DNS doesn't work) and see a demo web page.  Try to edit /var/www/index.html and see if your changes show up when you refresh the webpage.

Step 5: ez_setup, MySQL, matplotlib

Picture of ez_setup, MySQL, matplotlib
ez_setup is a Python program that loads some nice addons (think of it as apt-get on steroids)

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py

These next steps install some integration between Python and MySQL:

apt-get install python-mysqldb
apt-get install libmysqlclient-dev
easy_install MySQL-python

We'll be using the wonderful, powerful, and free(!) matplotlib for graphing our data, though we won't be using much of its power.

apt-get install libblas-dev liblapack-dev python-dev libatlas-base-dev gfortran python-setuptools python-scipy python-matplotlib

Step 6: WiringPi - GPIO interface

Picture of WiringPi - GPIO interface
Gordon Henderson has created a wonderful programming interface for the GPIO pins, including some drivers for the esoteric interface that our Temperature/Humidity sensor uses.  See http://wiringpi.com/ for more details.

git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
cd examples
emacs rht03.c (change the line #define RHT03_PIN 0 to #define RHT03_PIN 7 for the GPIO pin we're using)
make rht03
./rht03
(you should get continuous temperature and humidity readings)

now we know our hardware is working, let's write our own program...

Step 7: Set up a database and a table

Picture of Set up a database and a table
So we have database software, but there's no database, or tables, so let's create them:

Open the MySQL command interface:

mysql -ppassword <-- br="" mysql="" password="" picked="" previously="" the="" you="">
[...]

Create a new database, called Monitoring

mysql> create database Monitoring;
Query OK, 1 row affected (0.00 sec)

Select that as our current database

mysql> use Monitoring;
Database changed

Create a single table in the database called TempHumid, which will contain the Unix Epoch (seconds since 1970) and Temperature and Humidity readings

mysql>create table TempHumid (ComputerTime INTEGER UNSIGNED,Temperature DECIMAL(5,1), Humidity DECIMAL(5,1));
Query OK, 0 rows affected (1.70 sec)

Done with MySQL, exit back to the command prompt.

mysql> exit
Bye

Step 8: Add readings to the database

Because the timing is tight on the sensor protocol, we're going to use C code to communicate with the sensor and add readings to the database.

So go to the root user's default directory:

cd ~

copy the Makefile (instructions on how to build the code we're going to create)

cp wiringPi/examples/Makefile .

emacs makeFile
change the two lines below to match this:

INCLUDE = -I/usr/local/include,/usr/include/mysql

LDFLAGS = -L/usr/local/lib,/usr/lib/arm-linux-gnueabihf -lmysqlclient -lpthread -lz -lm -lrt -ldl

Now copy th.c (included here) into your default directory. Change the password on line 68 from "password" to whatever you chose as the MySQL password.

When you compile it:

make th

you'll get a couple of warnings about declarations of exit, but it'll work fine.

Now you can run the program by typing:

./th

It waits for a 60-second interval (minute) to end, then reads the sensor, inserts the time and sensor readings into the database, and loops forever.

Once we have that working properly, we want it to start whenever the Raspberry Pi starts up:

emacs /etc/rc.local
insert:

/root/th >> /root/th.log &

before the line that reads "exit 0"

reboot and see if th.log grows by one line per minute:

tail -f th.log

You can confirm that the data is getting into the database with:

mysql -ppassword
use Monitoring;
select * from TempHumid;

You should get a list of all values in the database.

Step 9: Graph data from the database

Picture of Graph data from the database
We're going to use Python for pulling readings out of the database and graph them with matplotlib.  Log in as root.

Set up the directory structure we'll be using:
mkdir Graph
cd Graph
mkdir graphics

copy GraphTH.py into the Graph directory
Change the password on line 40:
DBconn = mdb.connect('localhost', 'root', 'password', 'Monitoring')
to match the MySQL password you set previously.
You can also set on line 81 to match your desired location name

Try running it:

python GraphTH.py

It will get the last 24 hours of readings from the database, reorganize the data, throw out obvious bad data, create a graph of the results, and copy TH.png to /var/www so you should be able to see a new graph time you run GraphTH.py  at http://rpithon/TH.png

Now we want this to run every minute, so:
export EDITOR=emacs
crontab -e
Add the line:
* * * * * /usr/bin/python /root/Graph/GraphTH.py >> /root/Graph/GraphTH.log
at the bottom of the file.

Now GraphTH.py should run every minute, and if you update http://rpithon/TH.png (or http:///TH.png you should see it change about once a minute.

In the example above I covered the sensor with a damp Kleenex while it dried as a test.

Step 10: Monitor more than one location

Picture of Monitor more than one location
So I built five of these boxes for various locations, and on the LAMP server of one of them, added the following TH.html





 
   
   
    Temperature and Humidity readings
 

 
   

     


  

     Temperature and Humidity
    

  


  

    
      

  Sensor locations:
      

      

  White  - A Room
      

  Green  - Another Room
      

  Blue   - A Place To Monitor
      

  Purple - Another Place
      

  Orange - Somewhere Else
      

      

  Graphs are updated every minute.
      
    

  

     
     

     

     

     

     


so now I can point my browser at: http://rpithon-wht/TH and see all of the graphs updated every minute.

Step 11: Extras - Camera

Picture of Extras - Camera
image.jpg
You remember how we enabled the camera module when we installed the Raspian operating system?  Now we can add a Raspberry Pi Camera module:

$25 http://www.newark.com/raspberry-pi/rpi-camera-board/add-on-brd-camera-module-raspberry/dp/69W0689

Just feed the camera cable through the slot in the top case and plug it into the connector on the Raspberry Pi as per the instructions at http://www.raspberrypi.org/camera using the connector next to the Ethernet port, with the tinned leads pointing away from the Ethernet connector.

I used another piece of Azek to position the camera with some hot melt glue, but there are obviously  a lot of options.

Now you can use the camera module to let you see into the area you are monitoring for temperature and humidity.  From another computer you can do something like:

ssh root@rpithon 'raspistill -o image.jpg'
scp root@rpithon:image.jpg .

Or have a cron job save a new file to the webserver on a regular basis!

In addition to the camera, there are lots of other peripherals and functions you can add to the Raspberry Pi, let your imagination guide you!

PiPoE - powering a Raspberry Pi over Ethernet

Picture of PiPoE - powering a Raspberry Pi over Ethernet
This project enables a Raspberry Pi, , or other small computer to be powered over an Ethernet cable. This very handy if you have a Pi somewhere where getting mains power to it is difficult, or if you want to run several devices from one central UPS.
It's cheap and quite simple to put together, with just one slightly tricky bit of soldering...

Step 1: About Power over Ethernet

If you want to get straight on with building, skip this bit!
The basic principles of Power over Ethernet (PoE) are straighforward: at one end of the cable, either near the network hub or built into it, is an 'injector' which takes DC power and the network signals, and combines them onto one cable. At the far end of the cable is a 'splitter' which does the reverse, taking the cable input and producing a DC power output and a network connection.
There are two main types of PoE systems. 'Active' systems have circuitry at both ends so that the injector only turns power on when a compatible device is detected on the cable. This is the sort you'll find on commercial network switches with PoE built in. 'Passive' systems are commonly found in cheaper applications (e.g. home CCTV) - here the power is applied all the time and no detection circuitry is used.
A passive system uses spare wires in a CAT-5 network cable to supply power - a 10- or 100-Mbit Ethernet connection only needs 4 of the 8 available wires to operate, leaving 4 free for power. Gigabit Ethernet connections need all 8, so don't work with passive PoE. Fortunately just about all Gigabit devices will fall back to 100-Mbit operation if only 4 wires are connected.
This project uses a simple passive PoE arrangement. The only refinement is to use a higher DC supply voltage (12-24V) than the Pi needs, and to step it down to 5V at the Pi end. The advantages to doing this are:
  • supplying 5V directly at one end of the cable means the Pi would get less than 5V, due to the resistance in the cable. This would make the Pi less reliable as the cable got longer.
  • the current in the cable is less, meaning that less electrical power is wasted.
  • the step-down regulator provides (some) protection for the Pi if the cable is mis-connected.

Step 2: You will need...

Picture of You will need...
IMG_1043.JPG
IMG_1029 Network tester.jpg
The project uses these components:
  • A DC power supply - any voltage between 12V and 24V, regulated or unregulated, will do. In my tests, powering a Raspberry Pi used under 200mA at 15V, so make sure the supply is rated at least 250mA (at 15V) or 300mA (at 12V) for each Pi you will be powering.
  • A passive PoE injector box. The one in the pictures was £7 on Amazon for a 4-port one - many other types are available.
  • A short length of CAT5 cable with a RJ45 plug attached. (I cut the end off a short Ethernet patch lead where the plug on the other end had broken).
  • A DC-DC step down converter module. (Search for 'LM2596' on Amazon or eBay - the one shown in the pictures was about £2).
  • A PCB-mounting RJ45 socket.
  • A two-pin 0.1" pitch socket (for a Raspberry Pi), or DC jack plug (for Beaglebone)
  • A small piece of prototyping pad board. (Note this has to be pad board not strip board).
  • Wire, cable ties
You will also need these tools:
  • Fine-tipped soldering iron + solder
  • Wire cutters, strippers, pliers, etc.
  • A multimeter
  • A drill with small (1mm) bits - a Dremel is ideal
  • Optional: a network cable tester(see photo)

Step 3: Solder in the RJ45 socket

Picture of Solder in the RJ45 socket
Life is never just easy, and the first problem is getting an RJ45 socket soldered into some 0.1"-pitch pad board.
One row of pins will fit fine, but the other is offset, and you need to drill out holes in the board until they go in. Also, the plastic mounting lugs will need a bigger hole. The end result isn't pretty, but if you get 4 pins in OK, the socket will be pretty solid.

Step 4: Wire up the DC-DC converter

Picture of Wire up the DC-DC converter
IMG_1023.JPG
The DC-DC converter module can now be mounted on the board. The one I bought had its input and output connections in the corners, which let me attach it using four Molex pins (see photo). Put the pins in right places in the pad board, then lower the module down over them, and soldered the top of each pin to the module. Then turn it all over and solder the bottom of each pin to the pad board.
The next stage is wiring the converter's input to the RJ45 socket. This is best done by following the photo: the back row of pins on the socket are numbers 1,3,5,7 (left to right), and the front row are 2,4,6,8. You'll need to connect both pins 4 and 5 to the converter's +V input, and 7 and 8 to the -V (or Ground) input. These are the red and black wires, respectively, in the photo.
At this stage, I would strongly recommend checking the connections are correct using a multimeter:
  • connect the board to the PoE injector unit using a short RJ45 cable (make sure it's not a 'crossover' cable)
  • check that the -V on the converter module is connected to the -V or ground on the injector's input socket
  • check that the +V on the converter is connected to +V on the injector
  • check for short circuits between the +V and -V on the converter
If all is well, apply power to the PoE injector and check that there is a corresponding voltage between the +V and -V input to the DC-DC converter. If so, check that you have +5V on the output terminals of the converter. (The module I bought had a trimmer to adjust the output voltage). Please check the converter output voltage before wiring this to the Pi, as the Pi will be damaged if it is too high.

Step 5: Wire up the Ethernet connection

Picture of Wire up the Ethernet connection
IMG_1028.JPG
Here comes the tricky bit!
Start by cutting off one end of the spare Ethernet cable, leaving about 20-25cm of the cable attached to one of the plugs. Strip off about 3cm the outer sheath, exposing the 8 cores in the cable, then strip a few mm from the end of each core.
The Ethernet connection is made by connecting pins 1, 2, 3 and 6 on the RJ45 socket to the same pins on the plug. The standard ("T568B") wire colours for these are as follows:
  • Pin 1 - white + orange stripe
  • Pin 2 - orange
  • Pin 3 - white + green stripe
  • Pin 6 - green
It is worth checking (with a multimeter) that your cable follows these beforesoldering the wires in, as it'll be messy to put right afterwards. Once you have picked out the four wires you need, the other four can be snipped off, as they should be left unconnected.
To attach the wires to the pins of the RJ45 socket, I found it helpful to drill out four of the holes in the pad board so the wires could be fed through from the top side. This holds them in the right place for soldering, and will provide some strain relief when assembled.
When you're done, the socket should look something like the photograph (except, hopefully, a bit neater). To hold the cable in place, I drilled a couple of small slots in the pad board, then threaded through a small cable tie.

Step 6: Connect power to the Pi

Picture of Connect power to the Pi
The Raspberry Pi can be most easily powered by connecting to the power pins on the GPIO header. The (original) Model A and B headers are described athttp://www.raspberrypi.org/documentation/usage/gpi... , and the newer Model B+ header is shown at http://www.element14.com/community/docs/DOC-68203/...
For either model, pins 4 (+5V) and 6 (Ground) are suitable connection points. I used a simple 2-pin 0.1" socket (Multicomp 2212S-02SG-85 fromhttp://cpc.farnell.com) wired as shown in the photo: the red wire is +5V and the green is ground. You may want to protect the connections with heat-shrink sleeving or a blob of silicone.

Step 7: Test and go!

Picture of Test and go!
IMG_1048 whole system.JPG
It's a good idea to give the wiring a final check before hooking up the Pi. Using a network tester or multimeter, check that lines 1, 2, 3 and 6 are connected through the RJ45 socket to the RJ45 plug (see photo). Do not connect the network tester to the PoE injector when it is powered on, as it will fry the LEDs in the tester.
The whole system can now be assembled. The 'input' side of the PoE injector (marked 'LAN' in the photo) connects to a network hub / router. The 'output' side connects to the splitter board via a network cable (usually this will be much longer, of course). The RJ45 plug and power lead from the splitter board go to the Pi - double check the connection to the GPIO header before powering on.
If all is well the Pi will boot when you apply power to the PoE injector, and it will have a connection to your network. Success!

Thursday, March 03, 2016

iOS APP or LIBRARY with source code - a must HAVE

Imageless Gradient Buttons for iOS
A subclass of UIButton that provides imageless gradients. Drop-in compatible with any project.

MKNumberBadgeView for iOS
A UIView subclass that mimics the look and feel of the red Springboard and UIBarButtonItem 'badges'. Since it's a UIView, it can be overlaid on any other item.

PDColoredProgressview for iOS
An UIProgressview subclass with support for setting a tint color instead of the boring default blue.

Gloss-Caustic Shader for iOS
Reproduces the oft-seen glossy gradient effect

WEPopover for iOS
Generic popover implementation for iOS with same API as the UIPopoverController for the iPad, but configurable with custom background and available for iPhone as well.

iOSPlot for iOS
Draw line charts and pie charts in iOS.

MeterView for iOS
Dashboard-style gauges for iOS.

NAMapKit for iOS
Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework.

TreeMapKit for iOS
A tree map implementation for Cocoa Touch. You can display tree maps in iPhone, iPod touch and iPad.

MNColorSelectionViewController for iOS
A color picker for iOS that tries to mimic the color picker Apple uses in the iWork iOS applications.

DCRoundSwitch for iOS
DCRoundSwitch is designed to be a drop in replacement for UISwitch. It is styled 'modern' so will unify the look of your apps into the future whilst retaining backwards capability. Drawing is done in CoreGraphics so no images are required.

RSColorPicker for iOS
Easy to use, simple to customize. HSV Color picker for iPhone and iPad. Uses delegation and allows full control over brightness.

NDRotator for iOS
iOS GUI control element, representing a dial or touch disc.

XBPageCurl for iOS
A page curl animation/transition for views in iOS that intends to mimic the behavior of the pages in apps like iBooks and GoogleMaps for iOS.

OCMapView for iOS
Simple and easy to use clustering mapView for iOS.

iRate for iOS
A handy class that prompts users of your iPhone or Mac App Store app to rate your application after using it for a while. Similar to Appirater, but with a simpler, cleaner interface and automatic support for iOS fast application switching

PSStackedView for iOS
Open source implementation of Twitter/iPad stacked ui - done right.

F3BarGauge for iOS
customizable LED/LCD-like bar gauge for iOS.

MotionJpegImageView for iOS
Generic UIImageView subclass designed to load and play Motion-JPEG streams such as commonly used with IP cameras, etc.

F3Swirly for iOS
The control uses Quartz 2D and Core Animation to provide a reasonable level of performance with virtually no CPU overhead required for the animation. The number of segments, segment color, segment thickness, rotation rate, and text can all be customized.

YLProgressBar for iOS
Custom progress bar for iOS (iPhone, iPad) with an animated background. It is build using the Core Graphics framework.

TweetBot like UIAlertView and UIActionSheet replacement for iOS
if you're sick and tired of the old UIActionSheet and UIAlertView's look or just can't do what you want with them, these classes are the answer to your prayers.
The classes can be easily customized to your look and feel and they're even easier to use than the iOS API classes because they use blocks for the actions, not a freaking delegate.

F3PlotStrip for iOS
Plotting strip for dynamic data which can also be used as a sparkline. Data may be supplied one value at a time (as when reading sensor or other data) or can be supplied as an NSArray (as when using as a sparkline). Color, plot width, etc. are all customizable. The control can also update a UILabel (or derivative) instance dynamically when values are added, and a user-specified format string allows you to control the formatting of the displayed value.

Touchposé for iOS
Touchposé is a set of classes for iOS that renders screen touches when a device is connected to a mirrored display. Touchposé adds a transparent overlay to your app’s UI; all touch events cause semi-transparent circles to be rendered on the overlay—an essential tool when demoing an app with a projector (with an iPad 2 or iPhone 4S).

UICircularSlider for iOS
an iOS UISlider which displays value in a circle / pie.

AURosetteView for iOS
A good looking, animated share button.

DAAnisotropicImage for iOS
DAAnisotropicImage is an anisotropic UIImage generator. Specifically, for a metallic slider knob.
It was built to be an imitation of the volume slider thumb image in Apple's iOS 6.0 Music app.

KGauge for iOS
iOS UI component to display gauges with skins and different configuration options

GPUImage for iOS
It's a framework that filters still images and video using openGL 2.0 filters. Similar to the XBImageFilters. There are already a ton of filters written for GPUImage including edge detection, lots of overlays, cartoon filters, etc

FRD3DBarChart for iOS
A 3D bar chart control made with GLKit.

MTAnimatedLabel for iOS
MTAnimatedLabel, a UILabel subclass that supports animation like the iPhone lock screen.
                                                                                     
PMCalendar for iOS
Yet another calendar component for iOS. Compatible with iOS 4.0 (iPhone & iPad) and higher.


PMCalendar supports selection of multiple dates within one or several months, could appear as a popover (if you used UIPopoverController before, you'll find PMCalendar management very similar), supports orientation changes out of the box and does not require any third party frameworks.

Easy to use as a modalview at app launch for example.

Simple iCloud file management. Read, write, load, list files across devices.

INTULocationManager makes it easy to get the device's current location on iOS.

It`s just a simple and flat Digital Clock.

BRFlabbyTable is a set of classes that allow you to add a bouncy and distorted effect on a cell frame while the table is scrolling. The "flabbiness" of the cells is based on the speed of scrolling. Upon pressing and dragging, the highlighted cell grows around the touch area

A Star algorithm implementation for iOS

Visualize touches, pans and long presses on your iPhone or iPad useful when recording video tutorial

Tabbed Split View Controller for iPad is a custom split view controller, with vertical left tabbar control for navigation between master view controllers. Tabbar contains tabs for navigation between view controllers and actions buttons for some actions (for example, exit from application). Also it can be used without tabbar control as customizable alternative UISplitViewController.

Custom UIButton effect inspired by Google Material Design

Flat colors taken from Google's Material Design: Paper. http://www.google.com/design/spec/style/color.html
Switch is a UIControl subclass that creates a UISwitch like control with provided image.

View showing circular chart with customizable number and range of colors on outer ring with background transparency/colors configuration. There is also an option to show legend. You can customize legends labels & dots, change its position (top/bottom/left/right). Call heightForChartSize: method on legendView to get height for selected width and chart radius.

This is a simple popup menu for iOS. Inspired by iOS7 grouping folder (loook alike) in the springboard. Is is purely based on UIView. Includes flats looks, callbacks using blocks & several options for curved corners & flat corners, bordered popup. This control supports paging using scrolls, so that user can add n number of menu items to the popUp. Any menu when selected creates a ripple effect on the tapped item

Easily present the latest changes and features to your users on app updates.

Internet Connection Indicator for iOS application. Shows you when there's now internet connection.
Will improve the chance you get accepted to the App Store, for apple requires you to warn the user when there's no connection.

an iOS table view of 2014 world cup countries by groups, to save the mechanical works related to 2014 world cup app

Secret app like text animation

This is a UIBarButtonItem category to add a badge icon on any UIBarButtonItem.

An easy way to show historical price graphs for any stock.

UIControl subclass like iOS 7 Phone app button

UIColor Category for Brand Colors

ACPReminder provides automatic local notifications.

SQL and SQLite database manage on iOS made easy. Create, open, rename and delete databases with AFSQLManager, a block-driven iOS SQL and SQLite manager class. Perform queries never has been that easy!

You can add a near "Linear Shadow Color" choosing a color like [UIColor redColor] or you can use "Linear Shadow" based on a photo, this will find the average color and add a shadow.

A progress view showing percentage complete in an easy to customize animated popup view. If you supply an array of UIColors, the popup view will animate the color change as the progress bar updates

This demo application extracts frames from videos.

A flat and light implementation of UIButton for iOS

UICollectionViewLayout subclass for displaying electronic program guide.

Easy to use auto-hiding notice bar below Navigation Bar

Material Design Icons are the official open-source icons featured in the Google Material Design specification.
What's included?

SVG versions of all icons in both 24px and 48px flavours
SVG and CSS sprites of all icons
1x, 2x icons targeted at the Web (PNG)
1x, 2x, 3x icons targeted at iOS (PNG)
Hi-dpi versions of all icons (hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi) (PNG)

Interesting SGProgressIndicator multiple inner circle

MMPulseView for iOS
A simple view to show circle pulse in a loop

A simple line chart library for iOS that is easily adjustable (size, color, line width, label displayed,...). It comes with a nice and subtle appearing animation.

Animated Alert View written in Objective-C, which can be used as a UIAlertView or UIAlertController replacement

A replacement class for CLLocationManager for when you want to easily fetch just once the current device location

A simple way to debug your view hierarchy

Objective-C library for detecting running device model and screen size.
With the newer devices, developers have more work to do. This library simplifies their job by allowing them to get information about the running device and easily target the ones they want.

Color blindness simulation in real time for iOS apps.

Unlike other similar controls with low performance and lagging with UITableView. MIBadgeButton is badge button with high UITableView/UICollectionView performance. iOS custom button badge designed for iOS 6 & 7

JYGraphView is an easy way to graph data in a simple and minimalist style. It is easy to get up and running and highly customisable. The sample app helps you configure your desired graph

MALoggingViewController is a real-time pseudo-console you can embed in your application, perfect for testing and debugging in the real world.
Whether you are determining the reliability of network traffic while driving through areas with poor service, testing push notifications on ad-hoc builds while not connected to Xcode, or working out those pesky Core Location bugs, there's no need to carry around half of your development environment with you.
No more driving around town with the Xcode console open, or having to handle logging to files and emailing them later to figure out what the heck happened - you can see all the data on your device, anywhere, in real time.

A drop in solution to show UIView's size. Only one line code to use it

A UIColor category that returns the opposite value from any color

Replacement for UIActionSheet on iOS 7, with customizable fonts and colors, and block-based actions.

Convert any UIImage to ascii art

Pick color with image view.

AFMSlidingCell is UITableViewCell subclass for showing any kind of buttons underneath the cell, revealable by swipe. It is a common way of displaying any cell-related actions (e.g. deletion) without overloading default UI.

Detects the hardware, software and display of the current iOS or Mac OS X device at runtime.

Checks if there is a newer version of your app in the AppStore and alerts the user to update the app.

Cool-iOS-Camera is a customizable and modern camera implementation that resolution adaptable to all iOS devices.
Features: - Extremely simple and easy to use - Customizable interface - Code-made UI assets that do not loose resolution quality & resize dynamically depending on the screen size of the device. - Added animations to the UI elements for a more intuitive and responsive feel. - Overlays over any presented view controller or view - Made for iPhone & iPad - Built for iOS 8

A mesmerizing view with lots of options. It is meant to be used with BFRadialWaveHUD, but you are free to take it :)

A progress HUD using BFRadialWaveView.

Summon Uber from your app with 2 lines of code.

GTrack is a lightweight Objective-C wrapper around the Google Analytics for iOS SDK with some extra goodies.

iPerspective is a iOS librarie of control with augmented reality.
https://github.com/ericpinet/iPerspective
JTMaterialSwitch is google's material design like switch UI with animation features.
This library has cool and sophisticated animations, ripple effect and bounce effect. Also, customizable properties can be tweaked behaviors and enhance your application UI richer and cooler.
With this library, you can easily implement material design switch to your app.

This is a modification to ZFPlotChart that includes line, bar, and scatter plot options

Simple, easy to use and customizable loading indicator (loader) for iOS applications.

Makes Copy Xcode Issue Description Easily, Support Finding Answers in Google or StackOverflow Directly

An Objective-C clone of github/ariok/BWWalkthrough using only XIB files, no storyboards

A simple horizontal ColorPicker for iOS apps. Easy to add in your project.

LMGaugeView is a simple and customizable gauge control for iOS.

Replacement for UIAlertController/UIAlertView with support for content views and UI customization.

Support rotation and click event, Support replace image.

iOS pull to refresh for UIScrollView, UITableView and UICollectionView

AlertView with PickerView and Switch

JTAlertView is the new wonderful dialog/HUD/alert kind of View. It was also designed to cover user’s needs during customization. Created with delightful combination of image, parallax and pop effects, JTAlertView improves your user experience.

A menu implementation with a slide in menu similar to Medium's menu.

DGActivityIndicatorView is a great way to make loading spinners in your application look nicer. It contains 6 different indicator view styles.

BTBalloon is a custom UIView subclass that will display text and optionally an image and/or button in a balloon style popup. You could use this view as tool tips to highlight various parts of your apps UI, or create an interactive tutorial (see example project). Think of BTBalloon views as being a cross-between UIAlertView and UIPopover.

A Comprehensive PathFinding Library for Objective-C

The LGSublimationView is a view that has a cool paging animation on its UIScrollView. The effect it gives off is that there are views behind the scroll view that don't scroll with the scroll view. Rather, when the scroll view pages, they cross disolve into one another

A Floating Action Button inspired from Google inbox for iOS.

A simple color slider for iOS

MaterialDesignSymbolObjC

Icon font library for Objective C

Themis
Crypto library for storage and messaging for ObjC, Android, С++, JS, Python, Ruby and PHP https://www.cossacklabs.com/ 


UzysAnimatedGifPullToRefresh
Add PullToRefresh using animated GIF to any scrollView with just simple code  

VBFPopFlatButton
Flat button with 9 different states using POP

MZTimerLabel
A handy class for iOS to use UILabel as a countdown timer or stopwatch just like in Apple Clock App.  

CZPicker
a picker view shown as a popup for iOS in Objective-C  

VLDContextSheet
Context menu similar to the one in the Pinterest iOS app  

4160 open source UI components
for iOS and OS X.

VolumeControl
VolumeControl is a custom volume control for iPhone featuring a well-designed round slider

Actionsheetpicker-3.0
Quickly reproduce the dropdown UIPickerView / ActionSheet functionality from Safari on iPhone/ iOS / CocoaTouch

ValueStepper
A Stepper object that displays its value.

SWRevealViewController
A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right !

CBZSplashView
Twitter style Splash Screen View. Grows to reveal the Initial view behind  

GaugeKit
Kit for building custom gauges + easy reproducible Apple's style ring gauges. https://www.cocoacontrols.com/controls/gaugekit  

AESCrypt-ObjC - Simple AES encryption / decryption for iOS and OS X

Simple class for iOS that shows nice popup windows.

This iOS framework allows settings to be in-app in addition to or instead of being in the Settings app.

Easy to use and customizable messages/notifications for iOS

iOS 7 radial animated progress view.

CircleProgressView

A curated list of awesome iOS frameworks, libraries, tutorials, Xcode plugins, components and much more. The list is divided into categories such as Frameworks, Components, Testing and others, open source projects, free and paid services. There is no pre-established order of items in each category, the order is for contribution. If you want to contribute, please read the guide.

OLGhostAlertView for iOS
OLGhostAlertView allows you to present a translucent view with a title and an optional message on the bottom of the screen. Use it to inform your user about temporary issues that do not require any immediate action and are not blocking the flow of your app.
OLGhostAlertView can have a title and an optional message, in a way similar to UIAlertView. It automatically fades out after a configurable time interval and, by default, can be dismissed with a tap. It can automatically adapt its size according to the device it's being deployed on, user interface orientation and length of the strings passed to it.

ColorPopover for iOS
A ColorPopover is a very simple component for iPhone/iPad that provides a "Popover" color picker.

DSFavIconManager for iOS
DSFavIconManager is a complete solution for displaying favicons.
Features:
Download a favicon from the URL. Fast and concurrent.
Cache icons in memory and in disk. It doesn't uses a full blown HTML parser.
Optional fall-back to apple touch icons for retina displays.

PTSSpringBoard for iOS
A springboard implementation, as know from the Apple iOS main screen. Supports moving and deletion of items. Work with all interface orientations and for different screen-sizes. Was tested with the iPhone (should work on the iPad too).
The PTSSpringBoard uses a UITableView like delegation pattern to communicate with its data source and delegate.
The code is documented - and the demo project should demonstrate the possibilities of the class.

KGModal for iOS
KGModal is an easy drop in control that allows you to display any view in a modal popup. The modal will automatically scale to fit the content view and center it on screen with nice animations!

ALRadial for iOS
ALRadial is meant to replicate the radial menu's found in the path ios app. a central button is used to display many buttons flung out in a circle.
video: http://youtu.be/9uszKz4Ct8U

KYArcTab for iOS
Arcing tab view controller with toggle animation. Supports 2 to 4 tabs. What's more, you can swipe left or right to toggle the views.
B.t.w, this control is separated from iPokeMon (a PokéMon game on iOS with Location Based Service), you can take a look at the demo video how cool it is!
SocialAccounts for iOS
SocialAccounts is an iOS framework that provides an easy way to manage social network accounts

MLPAutoCompleteTextField for iOS
MLPAutoCompleteTextField is a subclass of UITextField that behaves like a typical UITextField with one notable exception: it manages a drop down table of autocomplete suggestions that update as the user types.
As of version 1.3 there is also support for showing the autocomplete table as an accessory view of the keyboard

RFQuiltLayout for iOS
RFQuiltLayout is a subclass of UICollectionViewLayout that positions various sized cells like a mason laying bricks.
Fast
Insert/Delete animation friendly
Dynamic layouts however you'd like them.

TB_CircularSlider for iOS
This is a circular slider to select a value from 0 to 360. The control is a subclass of UIControl and it is drawn using Core Graphics.

MBSpacialViewController for iOS
Create a gesture-driven map of view controllers in 2D space.

ActionSheet for iOS
An easy to use and customize replacement to the stock UIActionSheet 4 buttons max

MDRadialProgress for iOS
A custom UIView useful to represent progress in discrete steps.

DMX Dip for iOS
A DMX Dip (switcher) for iOS useful for addressing DMX devices. A different toggle/switch control
Implementation example in an iPhone storyboard (binary <==> decimal)
Easy integration (external XIB/Class) Getter method Direct editing with keyboard Toogles

MTZTiltReflectionSlider for iOS
A UISlider subclass mimicking and improving the tilt controlled slider added to Music.app in iOS 6
The knob changes it's lighting reflection based on the motion of the device.

ILAlertView for iOS

LARSBar for iOS
An oddly-named UISlider subclass which mimics the EQ slider found on Twitter's #music app.

FontAwesomeKit for iOS

SIAlertView for iOS
An UIAlertView replacement with block syntax and fancy transition styles. As seen in Grid Diary.
ETActivityIndicatorView for iOS
A Windows Phone-like activity indicator for iOS.

WTGlyphFontSet for iOS

RESideMenu for iOS
iOS 7 style side menu inspired by Dribble shots (first and second)

RCHGestureGuide for iOS
A tool to display gesture hints to your users on any area of user interface area of your application.
Allow the user to dismiss and remove guides for different areas of your applications and re-enable them on demand.
Easily customize the icons and animations.

JATickerView for iOS
Customizable scrolling LED ticker library for iPhone and iPad.
Authentic digital LED ticker - display stock quotes, sports scores, the latest headlines, or more in your app- just provide the data.
Customize the ticker speed and light bulb colors.
Digital symbols for English included, with API hooks to provide localized ticker symbols in any language.
Customize individual ticker bulbs with your own images.
Compatible back to iOS 4.3.

SevenSwitch for iOS
iOS7 style drop in replacement for UISwitch.

JSController for iOS
A set of classes that make it easy to build a controller UI for games.
Written purely in UIKit
All controls are both delegate based and/or pollable.
D-Pad class with full 8 directions, background and direction images can be swapped out
Push Button class with configurable background images
Analogue stick class that uses a normalized -1.0 to 1.0 scale and supports inverted Y axis. Background and handle images can be swapped out.
Can be used within Interface Builder, just drag a UIView onto your XIB and set it's class as JSDPad, JSButton or JSAnalogueStick. You can set it's delegate from within interface builder as well as its position and size.
This project uses ARC. If your project does not use ARC, you will need to add the compiler flag -fobjc-arc to each of the JSController classes used in your project. This can be done in the Compile Sources build phase in the project settings

MMProgressHUD for iOS
An easy to use HUD interface with personality.

ESCObservable for iOS
An iOS eventing framework (alternative to using NSNotificationCenter or delegates for eventing). Includes an example HSB color picker app (as seen in screenshot) showing how to make use of the framework in application code and unit tests.

Colors for iOS
A collection of predefined UIColors you can use in your apps. Just include the Colours.h/.m files and you'll have a slew of new colors to use

Powerful data driven content manager for UITableView

ALBatteryView for iOS
Simple view composed by a battery image and a view that fill the battery with the current battery level

RATreeView for iOS
RATreeView is a class designed to support implementation of the Tree View on IOS. Thanks to the great number of methods in delegate and data source protocols it is highly customizable. You can create Tree View with behavior and look matched to your needs.
It supports unlimited number of tree levels

MBXMapKit for iOS

One-line MapBox integration with MapKit on iOS and OS X
UIButton + Bootstrap 3.0 styles for iOS
Simple UIButton category that adds nice and flat Bootstrap 3.0 button styles.
No subclass, no images. Quartz Core drawing. Highly customizable.

LDProgressView for iOS
A flat or gradient progress view with a simple color setter and customizable options written in pure Core Graphics

KHFlatButton for iOS
Flat Button inspired by FlatButton and Instagram's flat button palette but with a few more added convenience methods and refactoring for iOS 7 support and customization. I've added BarButtons as well for use in UINavigationBars. Also has better support for button methods. It's also available as a cocoapod.

PXAlertView for iOS
PXAlertView is a UIAlertView replacement similar to the style in iOS 7 but with a block based API and the ability to customise the styling and add custom views

OWUProximityManager for iOS

An interactive, and customisable, clock component for iOS projects

RatingView for iOS
Auto-sizes the icon you want to the given frame. Handles tap and pan gestures. The value can be continuous or step by step while handling pan

ALSystemUtilities for iOS
This library provides a lot of methods to get system information. You can check the RAM, the disk space, the active processes, the number of processors, informations about the carrier, the hardware and other info.
The screenshot shows the app ALSystem that is downloadable on the App Store and uses this library

Pan gesture To Back Naivigating in iOS App

MSDynamicsDrawerViewController
Container view controller that leverages UIKit Dynamics to provide a realistic drawer navigation paradigm
KXKiOS7ColorsAndGradients
A collection of colors and gradients taken from Apple's iOS 7 Apps and icons.

DBCompass for iOS
DBCompass helps you to develop iOS apps in which you need to determine the heading of the user's phone (refered to a coordinate) or the distance between the user and a given location.
It offers you a way to track the user's location and heading given by a coordinate or an address

SLCountryPicker for iOS

An extensible circular slider for iOS applications

Jawbone's iOS-based charting library for both line and bar graphs

Tumblr iOS app like menu view completely created using core animation

120 fps SLO-MO video recorder using AVFoundation

Mobile-Canberra for iOS
Mobile Canberra is an initiative by the ACT Government and the NICTA eGOV Cluster. It is a powerful platform for showing points of interest and services on a map.

LINQ4Obj-C for iOS

BMInitialsPlaceholderView for iOS

SAMultisectorControl allows you to create multiselect control with beautiful design and circular structure. It allows users to change values in an easy way.

KKColorListPicker

Combination alert view, table, and share view.

XMCircleTypeView is a UIView that allows you to display an NSString as a circular text. Is will take font kerning into account, so no weird spacings.

AXRatingView for iOS

A custom UIView with a rounded progress bar and a counter in the center of the circle. Supports multiple time intervals (in milliseconds), start/stop/resuming counter, set custom color, etc. (see example project)

An UIButton subclass that allows you to represent a fill percentage stylishly.

A UITableViewCell that allow swipe left to reveal a background view with parallax effect.

A Wunderlist API wrapper for Objective-C

A category for UIColor & NSColor a collection of major brand color codes via http://brandcolors.net

A modern iOS toast view that can fit your notification needs

RNBlurredSideViewController
RNBlurredSideViewController is a side view controller with a dynamic blurred background effect when swiping similar to the iOS 7 control center.

Circular Slider can be used for scalar values, list of values, and time

iOS library for quickly displaying images while scrolling

MGSwipeTableCell
MGSwipeTableCell is an easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions.
This library is compatible with all the different ways to create a UITableViewCell: system predefined styles, programmatically created cells, cells loaded from a xib and prototype cells within a storyboard. You can use autolayout if you want

DRColorPicker picker supports all resolutions, orientations and devices.
Features:
Manage favorites by saving, moving and deleting
Recent colors are stored
Pick color by hue
Pick color by color wheel with saturation and lightness bars
Import images to use as textures

Fancy Schmancy Joystick is a simple joystick class built for Cocos2d v3

BloodMagic is a framework, which gives you a way to create custom property attributes.

OS audio playing (both local and streaming) made easy through a complete and block-driven Objective-C class. AFSoundManager uses AudioToolbox and AVFoundation frameworks to serve the audio. You can pick a local file or you can use a URL to stream the audio, the choice is up to you.

A simple UIView subclass to display dynamically masked textFields.

A UISlider subclass that displays live values in an easy to customize, animated popup view. If you supply an array of UIColors, the popup view will animate the color change as the slider moves.

A storyboard-friendly library to animate button to have a two-state or bounce effect. One of the possible implementations of those effects is it can be used to build a menu buttons such as the one implemented in Android version of Tumblr App.
https://agusso.github.io/ASOAnimatedButton/

Twikee is a library to help you promote your app or game by using the most effective marketing technique : Twitter spreading. You can use it by providing extra content (unblock features, extra lifes, etc) to users in exchange for an advertising tweet about your app.