,

how to make drones




how to connect to the flight controller
. Install the packages:

sudo apt-get install python-pip python-opencv python-opencv-apps python-zbar zbar-tools vim-python-jedi vim-python-jedi python-editor eric idle vim-nox-py2
pip install Cython numpy
pip install pyrealsense
Local / Remote editing
With Ubuntu running on Intel Aero, you have a full desktop running locally. When you have a keyboard, mouse and hdmi screen connected on Intel Aero, you can launch regular graphical Ubuntu editors (eric, idle, ...). Or you can launch a terminal on your development station and run a command line editor (vim, nano) over ssh.

example: vim over ssh
vim

example: IDLE
idle

example: eric
eric

Flight control
Hello world in PyMAVLINK
Here's a simple python script using the basic pymavlink wrapper to arm the motors for 3 seconds. Arming the motors is the simplest action we can test to show everything is connected. Note: we're using tcp:127.0.0.1:5760 to connect to the flight controller, as we'll do for all the following examples.

UNPLUG THE PROPELLERS BEFORE RUNNING THIS CODE. WE INSIST.

#!/usr/bin/python
from __future__ import print_function

import pymavlink.mavutil as mavutil
import sys
import time

mav = mavutil.mavlink_connection('tcp:127.0.0.1:5760')
mav.wait_heartbeat()
mav.mav.command_long_send(mav.target_system, mav.target_component,
                          mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, 1,
                          0, 0, 0, 0, 0, 0)
time.sleep(3)
mav.mav.command_long_send(mav.target_system, mav.target_component,
                          mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, 0,
                          0, 0, 0, 0, 0, 0)
The motors should spin for 3 seconds. If they don't, it may be because:

you have not calibrated your flight controller with QGroundControl
the radio remote is not connected
your wall power supply does not provide enough power
Hello world in DroneKit
It’s important to know the basics of MAVLINK, as it the base of all communications with the Flight Controllers. But coding frames with python-mavlink is not developer friendly. DroneKit, developed by 3D Robotics, is one of the friendly python abstractions available under Apache v2 Licence : python.dronekit.io To install on Intel Aero, first connect your drone to a WiFi network (in client mode) with internet access and install Dronekit:

pip install dronekit
UNPLUG THE PROPELLERS BEFORE RUNNING THIS CODE. WE INSIST.

Here's the code, still arming the motors for 5 seconds:

#!/usr/bin/python
from dronekit import connect, VehicleMode, LocationGlobalRelative
import time

vehicle = connect('tcp:127.0.0.1:5760', wait_ready=False)
print "Arming motors:"
vehicle.mode    = VehicleMode("GUIDED")
vehicle.armed   = True
while not vehicle.armed:
        print "  Waiting for arming to be finished"
        time.sleep(1)
print "Keeping motors armed for 5s"
time.sleep(5)
print "Disarming"
vehicle.armed   = False
Hello world in PyMAVProxy
On top of being a developer friendly layer on top of MAVLINK, MAVProxy was designed to bridge the gap between programming-only libraries like DroneKit and graphical-only tools like QGroundControl. Check: ardupilot.github.io/MAVProxy Some people use it on a remote computer to control the drone and have optional user interfaces to complex functions, but you can use on the drone itself for autonomous drone development.

MAVProxy is using the MAVLINK protocol, but is focused on the Ardupilot variant, not the PX4 variant. IF you're interested in MAVProxy, you'll have to flash the Flight Controller with the Ardupilot firmware. To install on Intel Aero, first connect your drone to a WiFi network (in client mode) with internet access and install MAVProxy:

pip install MAVProxy
UNPLUG THE PROPELLERS BEFORE RUNNING THIS CODE. WE INSIST.

Launch the shell

mavproxy.py --master=tcp:127.0.0.1:5760 --quadcopter
And type a few commands to arm/disarm the motors:

arm throttle
disarm
bat
Cameras
Intel RealSense
We're covering Python programming with Intel RealSense SDK (pyrealsense) with model R200, included in the Intel Aero Ready To Fly Drone. If you have a newer camera like the D430, you'll need another SDK.

## setup logging
import logging
logging.basicConfig(level = logging.INFO)

## import the package
import pyrealsense as pyrs

## start the service - also available as context manager
serv = pyrs.Service()

## create a device from device id and streams of interest
cam = serv.Device(device_id = 0, streams = [pyrs.stream.ColorStream(fps = 60)])

## retrieve 60 frames of data
for _ in range(60):
    cam.wait_for_frames()
    print(cam.color)

## stop camera and service
cam.stop()
serv.stop()
OpenCV and RealSense
You can consider the depth data coming from the RealSense camera as an image, and manipulate it with OpenCV. Here's an example.

Barcodes
Let's use zbar to detect barcodes from the camera:

from sys import argv
import zbar
proc = zbar.Processor()
proc.parse_config('enable')

# set the correct device number for your system
device = '/dev/video13'
if len(argv) > 1:
    device = argv[1]
proc.init(device)
proc.process_one()
for symbol in proc.results:
    print 'barcode type=', symbol.type, ' data=', '"%s"' % symbol.data
And here's a test sheet with various sizes of barcodes.

Networking
Networked drone in WebSockets
Please refer to the module D2 - Software - Networked Drone of the course for more information about the following codes.

UNPLUG THE PROPELLERS BEFORE RUNNING THIS CODE. WE INSIST.

The Python websocket API on Intel Aero:

pip install websocket-server
A WebSocket client in your browser, to simulate a web call:

Optionally, a Library on your development station to send the request from a script instead of your browser:

pip install websocket-client
And here's the server code running on Intel Aero:

#!/usr/bin/python
from websocket_server import WebsocketServer
import re
from dronekit import connect, VehicleMode, LocationGlobalRelative
import time
vehicle = connect('tcp:127.0.0.1:5760', wait_ready=False)
vehicle.mode    = VehicleMode("GUIDED")
print("Flight Controller Connected")
def new_client(client, server):
        print("Client connected")
        server.send_message_to_all("Client connected")
def message_received(client, server, message):
if len(message) > 200:
message = message[:200]+'..'
print("Arming motors")
vehicle.armed   = True
while not vehicle.armed:
time.sleep(1)
time.sleep(5)
print("Disarming")
vehicle.armed   = False
server = WebsocketServer(8080, '0.0.0.0')
server.set_fn_new_client(new_client)
server.set_fn_message_received(message_received)
server.run_forever()
And the optional client code, running on a remote computer (change the IP 192.168.0.100 with Aero's IP on YOUR NETWORK):

#!/usr/bin/python
from websocket import create_connection
ws = create_connection("ws://192.168.0.100:8080")
ws.send("Alert, send drone")
result = ws.recv()
print("Received '%s'" % result)
ws.close()
Networked drone in MQTT
Please refer to the module D2 - Software - Networked Drone of the course for more information about the following codes.

To install the Python MQTT API on Intel Aero (should be there already):

pip install paho-mqtt
A MQTT client in your browser, to generate a message posting.

UNPLUG THE PROPELLERS BEFORE RUNNING THIS CODE. WE INSIST.

Here's the client code, running on Intel Aero:

#!/usr/bin/python
import paho.mqtt.client as mqtt
from dronekit import connect, VehicleMode, LocationGlobalRelative
import time
vehicle = connect('tcp:127.0.0.1:5760', wait_ready=False)
vehicle.mode    = VehicleMode("GUIDED")
print("Flight Controller Connected")

def on_connect(client, userdata, rc):
print("Client connected ")
client.subscribe("aero-paul")
def on_message(client, userdata, msg):
print("Arming motors ("+msg.topic+"/"+str(msg.payload)+")")
vehicle.armed   = True                                 
while not vehicle.armed:                               
time.sleep(1)                         
time.sleep(5)                                 
print("Disarming")                           
vehicle.armed   = False                     

client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
client.connect("test.mosquitto.org", 1883, 60)
client.loop_forever()
Deep Learning with Intel Movidius NCS
After installing the Intel Movidius Neural Compute Stick as described on this page and make sure the make examples result is ok, go to the first Python NCS code sample:

cd ~/workspace/ncsdk/examples/apps/hello_ncs_py
python hello_ncs.py
it should output

Hello NCS! Device opened normally.
Goodbye NCS! Device closed normally.
NCS device working.
For a real life example:

cd ~/workspace/ncsdk/examples/caffe/AlexNet
make run_py
it should output:

...
------- predictions --------
prediction 0 (probability 94.970703125%) is n03272010 electric guitar  label index is: 546
prediction 1 (probability 4.76684570312%) is n02676566 acoustic guitar  label index is: 402
prediction 2 (probability 0.102138519287%) is n02787622 banjo  label index is: 420
prediction 3 (probability 0.0409126281738%) is n04517823 vacuum, vacuum cleaner  label index is: 882
prediction 4 (probability 0.0347137451172%) is n04141076 sax, saxophone  label index is: 776
Peripherals
Intel Aero board LEDs
There's a multicolor LED on top of the board (if the board is in the enclosure, you can see the light from the white cable hole), and an orange LED under the board. As the LEDs are enclosed in the Ready-To-Fly design, it is not very useful. But if you build your own drone design or enclosing you may want to let the LEDs visible and use them. To install the IO module:

pip install python-periphery
And here is a sample code to test all the LED colors:

#!/usr/bin/python
import time
from periphery import GPIO

print "Top LED Blue"
gpio = GPIO(403, "out")
gpio.write(bool(1))
time.sleep(1)
gpio.write(bool(0))
gpio.close()

print "Top LED Green"
gpio = GPIO(397, "out")
gpio.write(bool(1))
time.sleep(1)
gpio.write(bool(0))
gpio.close()

print "Top LED Red"
gpio = GPIO(437, "out")
gpio.write(bool(1))
time.sleep(1)
gpio.write(bool(0))
gpio.close()

print "Bottom LED Orange"
gpio = GPIO(507, "out")
gpio.write(bool(1))
time.sleep(1)
gpio.write(bool(0))
gpio.close()
Share:
Read More

Flipkart Axis Bank Credit Card

Flipkart Axis Bank Credit Card unlocks a world where it rains cashback with every transaction. With accelerated cashback across all your favorite categories including travel, shopping, entertainment and lifestyle, there’s no limit to what you can earn with this card.



Eligibility:-

Individuals eligible for Flipkart Axis Bank Credit Card:
Primary cardholder should be between the age of 18 and 70 years
The individual should either be a Resident of India or a Non-Resident Indian
Please note that these criteria are only indicative and the bank reserves the ultimate right to approve or decline applications for Flipkart Axis Bank Credit Card.
Documents for Flipkart Axis Bank Credit Card application :
Unless there are case variations, the required documents for Flipkart Axis Bank Credit Card application include a copy of your PAN card or Form 60, residence proof, identity proof, a colour photograph and proof of income in the form of latest payslip / Form 16 / IT return copy.
Keep your documents for Flipkart Axis Bank Credit Card ready
The following documents are required:
  • PAN card photocopy or Form 60
  • Colour photograph
  • Latest payslip/Form 16/IT return copy as proof of income
  • Residence proof (any one of the following):
    • Passport
    • Ration Card
    • Electricity bill
    • Landline telephone bill
  • Identity proof (any one of the following):
    • Passport
    • Driving license
    • PAN card
    • Aadhaar card
Please note that this list is only indicative. Documents required may vary on a case-to-case basis.
Disclaimer: The credit card decision would be communicated within 21 working days

The Flipkart Axis Bank Credit Card fees and charges are listed in the table below:
DescriptionCharges
Joining feeRs. 500
Annual Fee1st year: Nil
2nd year: Rs. 500
Annual fee waived off on annual spends greater than Rs. 2,00,000.
Add-on card joining feeNil
Add-on card annual feeNil
Card replacement fee (lost or stolen or re-issue)Waived
Cash payment feeRs.100
Duplicate Statement feeWaived
Charge slip retrieval fee or copy request feeWaived
Outstation cheque feeWaived
Mobile alerts for transactionsFree
Hotlisting chargesNil
Balance enquiry chargesWaived
Finance charges (Retail purchases and cash)3.4% per month (49.36% per annum)
Cash withdrawal fees2.5% (Min. Rs. 500) of the cash amount
Overdue penalty or Late payment feesNil if total payment Due is upto Rs. 100
Rs. 100 if total payment due is between Rs. 101 - Rs. 300
Rs. 300 if total payment due is between Rs. 301 - Rs. 1,000
Rs. 500 if total payment due is between Rs. 1,001 - Rs. 5,000
Rs. 600 if total payment due is between Rs. 5,001 - Rs. 10,000
Rs. 700 if total payment due is Rs. 10,001 and above
Over limit penalty3% of the over limit amount (Min Rs. 500)
Cheque return or dishonor fee or auto-debit reversal2% of the payment amount subject to min. Rs. 450
Surcharge on purchase or cancellation of railway ticketsAs prescribed by IRCTC/Indian Railways
Foreign currency transaction fee3.5% of the transaction value


Value cart


DetailsAnnual Spends (Rs.)Cashback(Rs.)Discount/Benefits (Rs.)
Spends on Flipkart360001800-
Spends on Myntra, 2GUD12000600-
Preferred merchant spends660002640-
Other Spends60000900-
Fuel Spends12000-120
Dining Spends240003604800
Welcome Benefits--3291
Lounge Visit--4000
Annual Fee Waiver--500
Total Annual Spends2,10,000630012,711
Total Annual Benefits*
190119.05%
Share:
Read More

What is e-marketing?

What is e-marketing?

E-marketing (electronic marketing) is also known as internet marketing, web marketing, digital marketing or online marketing. E-marketing is the process of marketing a product or service using the Internet. E marketing not only includes marketing on the Internet, but also includes marketing through e-mail and wireless media. It uses many technologies to help businesses connect with their customers.
E-marketing is a type of marketing that is accomplished through modern technology such as internet and mobile. The importance of e-marketing has increased as a result of the increase in the number of Internet users. At the end of 2013, the number of Internet users in Arab countries reached 135.6 million users. The Internet has become the most popular way to search for or search for a product. There are many ways of e-marketing, and it is better to know all the types and methods of e-marketing, choose the right method that will make your marketing campaign a success.

Marketing via e-mail is one of the first methods of e-marketing.
E-mail marketing is the delivery of products by e-mail to any company. Email marketing is necessary for every company in every way, because any company gives new offers and discounts to customers on time, for which email marketing is an easy way.

Search engine optimization or SEO
It is a technical medium that places your website at the top of the search engine results, which increases the number of visitors. For this, we have to make our website according to keyword and SEO guidelines.

Social media
Social media is made up of many websites - such as Facebook, Twitter, Instagram, LinkedIn, etc. Through social media, a person can express his views in front of thousands of people. When we see this site, we see advertisements on it at certain intervals, it is effective and effective means for advertising.





YouTube Channel
YouTube is a medium of social media in which producers can make their products accessible to the people directly. People can also express their reaction on this. This is the medium where there is a crowd of people or say that a large number of users / viewers live on YouTube. It is an easy and popular way to make your product visible to the public by making videos.

Affiliate Marketing
The remuneration earned by advertising products through websites, blogs or links is called Affiliate Marketing. Under this, you create your link and put your product on that link. When a customer buys your product by pressing that link, you get hard work on it.

Apps Marketing
Making different apps on the Internet to reach people and promote their product on it is called apps marketing. This is the best way of digital marketing. Nowadays a large number of people are using smart phones. Big companies make their apps and make the apps available to the people.

Advantages of E Marketing
Some of the benefits of E marketing are given below:

Easy monitoring through web tracking capabilities helps in making the Emerging highly effective.
Using e-marketing, viral content can be created, which helps in viral marketing.
The Internet provides 24-hour and "24/7" service to its users. So you can build and build customer relationships around the world, and your customer can buy or order products at any time.
The cost of spreading your message across the Internet is nothing. Many social media sites such as Facebook, Linkedin and Google Plus allow you to advertise and promote your business independently.
You can easily and immediately update your registered customers via email.
If you are selling, your customers can start shopping at discounted prices as soon as they open their email.
If a company has an information sensitive business such as a law firm, newspaper or online magazine, then that company can deliver its products directly to customers even without using courier.
Disadvantages of E-Marketing
If you want a strong online advertising campaign then you have to spend money. Web site design, software, hardware, maintenance of your business site, online distribution costs, and cost of time invested, all must be included in the cost of providing your service or product online.
The number of people doing online marketing is constantly increasing, your company needs to reach maximum people.
Some people prefer live interactions when purchasing any product. And if your company has a small business with a location, it can prevent customers from buying who live long distances.
Share:
Read More

If you also play PUBG in mobile then definitely read this news

If you also play PUBG in mobile then definitely read this news

PUBG Corp allows players playing in mobile players and PC emulators to play simultaneously, making this a problem for many mobile players.
PUBG Mobile emulator 1
PUBG Mobile is well liked worldwide. It is also very well liked in India. The game was first launched for PC, but the game was also launched by the company for mobile players a few months ago.

However, the biggest problem for the players is that due to its popularity, the number of people cheating in it has started increasing. The company is making a lot of efforts to stop this, an example of which is that the company recently added a new anti-cheat system to the game through an update. Apart from this, the company has also been suspected of cheating 13 million players in the last few months.


Talking about cheating, the biggest problem is facing mobile players nowadays, because many players use game emulators in their PCs and play with mobile players. It is very easy to play using emulators. By using the mouse and keyboard, players can do everything accurately and quickly, which is a bit difficult in mobile. This was the reason that Tencent Games had to create its own emulator to save the cheating players through third-party emulator. The company launched this emulator in May this year. The company has said that the players playing in it will only match the rest of the players playing in the emulator.

However, let us tell you that, through a tweet, Tencent Games has said that even if there is a single player in the team playing through the emulator, then the entire team will be matched with the players with the emulator. This is a problem for players playing in mobiles, because players playing in the emulator can comfortably aim the gun or hide and move quickly through the mouse and keyboard. However, PUBG Mobile says that it is the player's own choice whether they want to play with emulator players or not, so the company cannot do anything for it.
Share:
Read More

Pyhton IDEs and Code editors

Writing Python using IDLE or the python shell is great for simple things but those tools quickly turn larger programming projects into frustating pits of despair. Using an IDE  or even a just good dedicated code editor makes coding fun-but which one is best for you?

Fear not Gentle Reader!We are here to hel[ explain and demystify the myriad of choices available to you . We can't pick what works best for you and your process , but you can expain the pros and cons of each and help you make aan informed decision .
Image result for python ide
To make things easier , we'll break our list into two broad categories of tolols: the ones built exclusively for python develoopment that you can use for python. We'll call out some Whys and why Nots for each . Lastly none of theese option are manually execlusive, so you can try them out on your own with very little penalty.

but first..........

What are IDEs and code Editors?

an ide (or integrated development environment) is a program dedecated to software developement. As the nameimplies, IDEs intergrate several tools specially designed for sofware development. these tools usally include:
1:- An editors designed to handle code (with for example syntax highlighting and auto-completion ).
2:-Build, execution and debugging tools some from of source control

Most IDEs support many different programming languages and contain many more features. They can therefore be large and take time to download and install. You may laso need advanced knowledge to use them properly.
In contrast, a dedicated code editor can be as simple as text editor with sytax highlighting and code farmatting capabilities. Most good code editors can execute code and control a debugger. The very best ones interact with source control system as well . Com[ared to an Ide a good dedicated code editor is usally smaller an quiclker, but often less feature rich.
Requirements for a good Python coding Environment:-  So what things do we really need in a coding to app , but there are a core set of features that makes coding easier:
    Save and reload code files:- if an IDE or editors won't let you save you work and reopen everythinglater , in the same state it was in when you left , it's not much of an Ide.
   Run code from whithin theenvironment:- Similar;y, if you havee to drop out of the editor to run you python code, then it's not much more thann a simple text editors.
   Debugging support:- Being able to quickly spot keywords, variables, and symbols inyour code makes reading and understanding code much easier.
  Automatic code farmatting:- Any editor or IDE worth its alt will recognize the colnon at he end of a whilee or for statement, and know the next line should be indented.

oF cource there are llots of other features you might want like source control an extension model build and test tools, language help help and so on . But the above list is what I'd see as " core features" that a good editing environment should support.

With these features in mind , let's take a look at some general purpose tools we can use for python Development.
Share:
Read More

Begin with motivation quote


 some student will have a drive form inside to learn new things and explore new ideas while some others look into successful person around them and get self-motivated to learn hard.

However , this is not the caste for all students and many of them will need immense motivation and inpiration from teachers and parents to work hard.
Image result for elephant
Stories are always a favorite area for students that invoke their love and interest. this is one of the reasons why teachers use this as a tool to motivate them in many areas.

This includes many common folks stories with a good moral at the end , real -life examples of successful person and simple stories of normal people who have been part of their journey. 
Here we can have a look at a few motivational stories that help students to work hard and lay thir foundation  for a succesful  life.

1. The Elephant Rope

A man was walking nearby to a group of elephants that was halted by a small rope tied to their front leg. he was amazed by the fact that the huge elephants are not break the rope and set themeselves free.
  He saw an elephant trainer standing beside them and he expressed his puzzled mind . The trainer said " when they are very young and much smaller we use the same size rope to tie them and, at that age , it's enough to hold them .

As they grow up  , they are 
 conditioned to believe they can't break away . They believe the ripe canstill hold them, so they never try to break tree."

moral:- It is the false belief of the elephant that denied their freedom for life time .likewise , many people are not trying to work towards success in their lifejust because they failed once before . So keep on trying and dont't get tired up with some false beliefs of failure.
Share:
Read More