Tag Archives: Popular posts

iOS Audio Player with Lock Screen Controls

audio_player_thumbPrior to iOS 7.1 the UIApplication’s beginReceivingRemoteControlEvents method needed to be called and remoteControlReceivedWithEvent implemented where you’d handle remote control events by the event type that is received. In iOS 7.1 MPRemoteCommandCenter is introduced. With command center it is much more convenient to handle the remote control events.

Continue reading iOS Audio Player with Lock Screen Controls

Arduino USV Robot with GPS and Compass

rover_thumbThe goal of this project was to create a robot that would be able to reach a goal geolocation from any starting position while avoiding obstacles. Performing this operation with multiple goal locations, the robot is able to travel a predefined path. Robot operation is based on two modes: Cruise and Wall follow (for obstacle avoidance). Cruise mode uses readings from GPS and Compass while the wall follow mode uses distance information acquired from 5 ultrasonic sensors as well as compass readings. The main operation loop runs at 20Hz.

Continue reading Arduino USV Robot with GPS and Compass

Franko – Arduino Self Balancing Robot

FrankoMy latest Arduino DIY project is a self balancing robot.

Arduino Uno R3 microcontroller board is used for this project. MPU6050, an 6DOF IMU (with accelerometer and gyroscope) is used to get the angle and L298N motor controller board controls the 2 motors.

The motors are 12V 122rpm and the wheels are 8cm in diameter.

Robot size is 17x10x30 cm. Three plexiglas plates are used to hold the frame and parts. Standard PID controller is used to control the robot. To tune the PID controller parameters 3 potentiometers are used.

Continue reading Franko – Arduino Self Balancing Robot

Large Dataset Sample – Core Data and NSFetchedResultsController with Search

I’ve created a sample app that uses Core Data and NSFetchedResultsController to display dataset of 50 000 items (Contacts). Search filters the items that contain search term in first or last name. The sample app is similar to Contacts screen of the Phone application. For the sample code and more info check my GitHub repository at https://github.com/lukagabric/LargeDatasetSample

LargeDatasetSample

iOS OpenCV Sample

circle_ocvRecently I’ve implemented some of the OpenCV functionality in an iOS project. Based on that, I have created a sample project with object recognition and general image processing. The sample project is based around the AbstractOCVViewController class with main image capture and transformation from iOS captured image to OpenCV IplImage object. An AbstractOCVViewController subclass needs to override and implement the didCaptureIplImage: method. The captured and processed IplImage object is passed here as a parameter. After image manipulation using the OpenCV framework, the didFinishProcessingImage: method is called. The method will handle the transformation and presentation of the IplImage in an UIImageView. There are three samples in this project – color circle detection, smile detection and image blur detection so you can try and test OpenCV yourself.

You may check the sample project at my GitHub repo:

https://github.com/lukagabric/iOS-OpenCV

Real and threshold images:

  • IMG_0093
  • IMG_0098
  • IMG_0101
  • IMG_0102

 
If you liked this blog post I’d appreciate if you followed me on Twitter

LTransitionImageView – iOS Image View With Transition Animation

One of the requirements of a recent project I was working on was an image view with a transition effect. Below you may see the transition effects:


 
 
 
 
 
 
 
 
 
 
 
 
 
 
There are three properties you may want to set:

  • image – the content image
  • animationDirection – one of the four supported transition animations
  • animationDuration – defaults to 2 seconds if not set

The following transition effects are supported:

  • AnimationDirectionLeftToRight
  • AnimationDirectionRightToLeft
  • AnimationDirectionTopToBottom
  • AnimationDirectionBottomToTop

You may download the source with sample code from my GitHub repo:

https://github.com/lukagabric/LTransitionImageView

If you liked this blog post I’d appreciate if you followed me on Twitter