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:

New Circuits

.

 


Popular Circuits

2 Transistor FM Voice Transmitter
Car central Light Dimmer
Battery condition indicator
Studio of Bill Ooms Computerized Ornamental Lathe
Stepper Motor Driver
What do I need for a basic RF circuit
lacuna vrm
dual voltage power supply 12 volt
ADUC845 12MIPS 8052 Flash MCU + 10-Ch 24-Bit ADC + 12-Bit DAC
5G14 3 ~ 6V adjustable power supply
Intelligent fire alarm telephone alarm circuit - finger circuit



Top