Programming for IOT developer

Thread Starter

Parth786

Joined Jun 19, 2017
642
I have started working on internet of things project. I have looked programming skill's for IOT developer in internet and I have seen so many language such as php, java script, python..etc. I do not have much experience of all three but I can learn. I want to learn the language that is most commonly used to develop IOT project.

Let me take two project
  1. Home monitoring system based on IOT
  2. Park monitoring system based on IOT
These were just example I just want to know one thing if I want to write program for iot program what the programming skill i need to require for any project

I understand the hardware part of the project. I know what hardware need to develop project but I am having problem in programming part But I couldn't decide how to write a program for any project.
.
Note: Please don't tell me so many option. Just tell me what programming language do you use to make IOT project.
 

Papabravo

Joined Feb 24, 2006
22,082
It just doesn't matter. Nobody from the outside can tell what language you used and the device itself does not care. Use whatever is available and convenient.
  1. First make it work
  2. Then make it fast
  3. Then make it elegant
That's all you need to know.
 

Thread Starter

Parth786

Joined Jun 19, 2017
642
It just doesn't matter. Nobody from the outside can tell what language you used and the device itself does not care. Use whatever is available and convenient..
Main problem is that there are so many way and I want to follow only one way which is more popular in now a days.

I have seen php, python and java These are mostly used in the project

Let take two project
  1. Home monitoring system based on IOT
  2. Park monitoring system based on IOT
Now How to start programming for these project's. What would you do if you were in my place
 

Papabravo

Joined Feb 24, 2006
22,082
Main problem is that there are so many way and I want to follow only one way which is more popular in now a days.

I have seen php, python and java These are mostly used in the project

Let take two project
  1. Home monitoring system based on IOT
  2. Park monitoring system based on IOT
Now How to start programming for these project's. What would you do if you were in my place
Why would you want to do that? Popularity is hardly a reason for (mis)using something. You pick something popular and by the time the project is finished the popular thing is an also ran. You can keep setting up straw men, but you would be better served by doing your first implementation and throwing it away. Why? Bbecause ultimately you will end up doing that anyway. Instead of engaging in slow stupid failure, put an implementation together in the shortest possible time and learn from your mistakes. With this approach it just doesn't matter what mistakes you make.
 
Last edited:

Thread Starter

Parth786

Joined Jun 19, 2017
642
Why would you want to do that. Popularity is hardly a reason for (mis)using something. You pick something popular and by the time the project is finished the popular thing is an also ran..
May be you didn't understand what I was asking or I didn't understand your answer. I have not found yet what I was looking for.

Most of companies work on recent technology. I think I should learn programming language which has more demand then other. so that I can get more chance to get job.

Suppose I want to make street light monitoring system based on internet things I think I can do programming for this project in two way

First way , HTML for web page and PHP for server as backend
Second way, HTML for web page and Python as backend

Am I right ? I want to know on which technology most of companies works. I don't want to work on outdated technology
 
Last edited:

Papabravo

Joined Feb 24, 2006
22,082
May be you didn't understand what I was asking or I didn't understand your answer. I have not found answer of my question yet.

Most of companies work on recent technology. I think I should learn programming language which has more demand then other. so that I can get more chance to get job.

Suppose I want to make street light monitoring system based on internet things I think I can do programming for this project in two way

First way , HTML for web page and PHP for server as backend
Second way, HTML for web page and Python as backend

Am I right ? I want to know on which technology most of companies works. I don't want to work on outdated technology
I'm not sure any of those options are appropriate, but I could be wrong. In fact why don't you prove that I'm wrong.
 

spinnaker

Joined Oct 29, 2009
7,830
May be you didn't understand what I was asking or I didn't understand your answer. I have not found answer of my question yet.

Most of companies work on recent technology. I think I should learn programming language which has more demand then other. so that I can get more chance to get job.

Suppose I want to make street light monitoring system based on internet things I think I can do programming for this project in two way

First way , HTML for web page and PHP for server as backend
Second way, HTML for web page and Python as backend

Am I right ? I want to know on which technology most of companies works. I don't want to work on outdated technology

Then why not learn multiple languages? Once you get one down, learning the next is that much easier. Just like learning spoken languages that aren't your first language.

Learn to program in a language that is easy for you first. Then start worrying about the next one.
 

Thread Starter

Parth786

Joined Jun 19, 2017
642
I'm not sure any of those options are appropriate, but I could be wrong. In fact why don't you prove that I'm wrong.
I know you have knowledge about internet of things, so that's why you replied on this thread. I think I should explain question in some other way.

Suppose you are IOT developer and I have given you three project
  1. Home monitoring system based on IOT
  2. Park monitoring system based on IOT
  3. Street light monitoring system based on IOT
I have already explained my approach for programming. How will you do programming for these project's as IOT developer ?

I have taken those example just for learning. I just want to see how do you complete part of programming. I am just talking about programming language

Note : Use only raspberry Pi. don't use esp8266
 
Last edited:

Papabravo

Joined Feb 24, 2006
22,082
OK.
First tell me what the requirements are for the various devices. Then tell me what hardware platforms are available and economically viable. Then tell me what hardware I have available to host the development tools. Then tell me what tools are available for less than or equal to some budget amount eg. $50. Now we can begin the top level design of the server devices, including what information they will exchange with the client side. At the same time we can design the client side applications to run on their platform including what information they will exchange with their server devices.
Taking what you have told me about the availability of device platforms, development systems, and software tools I flip a coin or use "dragon dice" to select one of the alternatives and go with it.

https://en.wikipedia.org/wiki/Dragon_Dice

The point here is that the actual choice is irrelevant for at least two reasons:
  1. As you proceed with the implementation you will quickly develop a sense for the probability of success. Rapid failure increases the chance of ultimate success.
  2. None of the design you have done has to be discarded if you change to another means of implementation.
Don't waste another minute obsessing about the choices -- just do something!
 

be80be

Joined Jul 5, 2008
2,395
java is probably #1 but i don't think you even opened the files i gave you.
just because the pi didn't use it at first don't mean the rest was better there was no easy way to comply on a pi

But java is in everything it's almost totally cross platform phones use cars use tv dishwashers hell about everything can.
that has arm uC in it.

People don't look at the bit's they looks at a app that they use.

Like this
Code:
import com.pi4j.io.gpio.*;
import com.pi4j.io.gpio.event.*;
import java.util.*;

/**
* This class represents a Button connected to the Raspberry pi on a given pin.
* Connect the button to 3.3v power and to a GPIO.
*
* @author Fabio Hedayioglu
* @author Ian Utting
* @author Michael Kölling
* @version 1.0
*
*/
public class Button
{
    // the button instance is an input pin.
    private GpioPinDigitalInput button;
   
    //this array maps the GPIO pin numbers to integers
    private static final Pin[] pinMap = new Pin[] {RaspiPin.GPIO_00, RaspiPin.GPIO_01, RaspiPin.GPIO_02, RaspiPin.GPIO_03, RaspiPin.GPIO_04,
        RaspiPin.GPIO_05, RaspiPin.GPIO_06, RaspiPin.GPIO_07, RaspiPin.GPIO_08, RaspiPin.GPIO_09, RaspiPin.GPIO_10,
        RaspiPin.GPIO_11, RaspiPin.GPIO_12, RaspiPin.GPIO_13, RaspiPin.GPIO_14, RaspiPin.GPIO_15, RaspiPin.GPIO_16,
        RaspiPin.GPIO_17, RaspiPin.GPIO_18, RaspiPin.GPIO_19, RaspiPin.GPIO_20};
   
    //the default pin, used by the constructor without parameters.
    private final static int defaultPin = 7;
   
   
   
    /**
     * Creates a Button at the default GPIO pin (7).
     *
     */
    public Button()
    {
        //create the Button in the default pin.
        this(defaultPin);
    }
   
   
    public Button(int p)
    {
        //get a gpio controller
        GpioController gpio = GpioFactory.getInstance();
        Collection<GpioPin> existingPins = gpio.getProvisionedPins();
       
        //if this button wasn't previously privioned, do it.
        button = getProvidedPin(pinMap[p]);
        if (button == null){
            button = gpio.provisionDigitalInputPin(pinMap[p], PinPullResistance.PULL_DOWN);
        }
       
    }
   
    private GpioPinDigitalInput getProvidedPin(Pin desiredPin)
    {
        GpioController gpio = GpioFactory.getInstance();
        Collection<GpioPin> existingPins = gpio.getProvisionedPins();
        for (GpioPin pin:existingPins){
            if (pin.getPin() == desiredPin){
                //this pin is already provisioned. take it.
                return (GpioPinDigitalInput) pin;
            }
        }
        return null; //not found
    }

    /**
     * Checks in the button is pressed.
     *
     */
    public boolean isPressed()
    {
        return button.isHigh();
    }
       
    /**
     * Add a listener to this button.
     *
     */
    public void addListener(final ButtonListener listener)
    {
        //creates a GpioPinListener to listen to this pin..
        GpioPinListenerDigital l = new GpioPinListenerDigital() {
            @Override
            public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event)
            {
                //checks if the raised event is for this pin.
                if (event.getPin().getName().equals(button.getPin().getName())){
                    //if it is, then call the event buttonChange in  our ButtonListener class and pass the
                    //current state of the button (pressed = true, released = false)
                    listener.buttonChanged(event.getState().isHigh());
                }
            }
        };
        //add the listener to this button.
        button.addListener(l);
    }
   
    /**
     * Remove all listeners from this button.
     *
     */
    public void removeAllListeners()
    {
        button.removeAllListeners();
    }
   
}
 
Last edited:

Thread Starter

Parth786

Joined Jun 19, 2017
642
Don't waste another minute obsessing about the choices -- just do something!
I have started working on project using HTML and PHP. I can switch ON/OFF LED using PHP script on Pi

java is probably #1 but i don't think you even opened the files i gave you.
I worked on it. I can switch ON/OFF LED. I told you that I am getting confuse in selection of programming language. You said, I should learn embedded java.

I did some research on internet, I found out most of Pi users use java script and node.js for their project.
 
Last edited:

be80be

Joined Jul 5, 2008
2,395
Do you want make a living or play with leds on the pi
Your lost there javascript is going to be lots of it on the web.

But that's because you could not comply java on a pi now you can and as these kids start using the new java tools
you'll start seeing app's that deploy the pi to do things lights camera action.

javascript is scripting language for Web pages

EmbeddedJava is Sun Microsystems' software development platform for dedicated-purpose devices with embedded systems, such as products designed for the
automotive, telecommunication, and industrial device markets

There not the same EmbeddedJava is what you want learn if you want a job that makes something as a programmer

javascript if you want play with the web and the pi

Now I'm not saying web developers don't make money

But I think you said you want be a programer learn EmbeddedJava
time you do that
You not even have to think to write some javascript
 
Last edited:

MrSoftware

Joined Oct 29, 2013
2,273
"Products" have different components, built using different technologies. Small physical sensor devices are probably programmed using C or assembly. Communication between components your PCB may use SPI, I2C, I2S, etc.. If there's a web interface to it then you may choose to use a plug-in web server that allows you to program the interface using PHP and/or javascript. If there's a database component then you'll likely use something like SQL. Are you worried about hackers or your device being used as a zombie in a DDOS attack? Then be sure you understand the security aspect. If it talks to the cloud then you'll need to program that component, as well as an API for connecting the device to your cloud server securely using something like OAuth, which also means you need to understand https.

So in short; first define (full specification) exactly what you're trying to make, THEN determine which technologies you need to learn to make that happen. In my personal opinion anyway..
 
Last edited:
Top