Making a Remote Controlled Car using Sun SPOT


Posted on Feb 7, 2014

Here remote Sun SPOT will send data to Sun SPOT on car which will drive the IC according to DC IO pins D0 - D3. The IC will drive the Motors which will run the car. package org. sunspotworld. demo; import com. sun. spot. io. j2me. radiogram. Radiogram; import com. sun. spot. io. j2me. radiogram. RadiogramConnection; import com. sun. spot. peripheral. NoRouteExcepti


Making a Remote Controlled Car using Sun SPOT
Click here to download the full size of the above Circuit.

on; import com. sun. spot. peripheral. Spot; import com. sun. spot. peripheral. radio. IRadioPolicyManager; import com. sun. spot. sensorboard. EDemoBoard; import com. sun. spot. sensorboard. peripheral. ITriColorLED; import com. sun. spot. sensorboard. peripheral. IAccelerometer3D; import java. io. IOException; import javax. microedition. midlet. MIDletStateChangeException; import com. sun. spot. util. IEEEAddress; import com. sun. spot. util. Utils; import javax. microedition. io. Connector; /** * Remote Spot will send Tilt values to the Car Spot. * * @author Jay Mahadeokar */ public class StartApp extends javax. microedition. midlet. MIDlet { EDemoBoard demoboard = EDemoBoard. getInstance(); protected void startApp() throws MIDletStateChangeException { IRadioPolicyManager rpm = Spot. getInstance(). getRadioPolicyManager(); IEEEAddress myAddr = new IEEEAddress(rpm. getIEEEAddress(); System. out. println("Hi! my address = " + myAddr. asDottedHex(); //This is my Car Sun SPOT address IEEEAddress bsAddress = new IEEEAddress(new String("0014. 4F01. 0000. 1231"); IAccelerometer3D acc = demoboard. getAccelerometer(); while(true) { try{ RadiogramConnection conn = (RadiogramConnection)Connector. open("radiogram://0014. 4F01. 0000. 1A29:10"); Radiogram rdg = (Radiogram)conn. newDatagram(conn. getMaximumLength(); try { //Get control called and value sent to car spot! rdg. writeUTF(""+getControl(); conn. send(rdg); Utils. sleep(200);...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Square Wave Oscillator II
    10 Band Audio Equalizer
    Led flasher
    A Bedside Lamp Timer Circuit Schematic
    LED Flasher 2-Transistors circuit diagram
    big e stereo parabolic microphone
    vhf ampand transmiter schematic
    The SV203 powered PPRKCircuit With Devantech SRF04 UltraSonic Sensor
    H1277 HIGH SENSITIVITY HALL EFFECT SENSOR IC WITH FG OUTPUT
    9700s Analog Synth Modules
    interfacing rs 232 with spartan 6 fpga
    AM Modulator



    Top