Menu
  • HOME
  • TAGS

My Thread is not working

android,sensor

All UI operations have to run on Main UI Thread. So if you want to show a toast message, this shouldn't done in a seperated Thread. In this case, toast message has to be in runOnUiThread() block as seen below. public class MainActivity extends Activity{ List<String>sName=new ArrayList<String>(); @Override protected void...

Light Gate Timer Arduino

timer,arduino,sensor,arduino-ide,arduino-uno

Try testing the sensors by writing the analogRead to serial. My guess is that the analogRead will never really be 0 since there will always be ambient light. Your threshold should be more analogRead(sensor1) < somevalue )...

Arduino voltage regulator power consumption

arduino,bluetooth-lowenergy,sensor,battery,atmega

You can't power it directly from a battery, because batteries do not output a constant voltage. You can use a switching regulator like the LM2936 and power your Arduino through the 5V pin. That would bypass the onboard regulator and supply your Arduino with a nice steady and efficient 5...

Using accelerator sensor android to get Direction

android,sensor,android-sensors

You need to think about what an accelerometer is and what it does. It's basically a force meter. It detects a force on the device, and measures it. It always tells you the current level of force (which will actually never be 0 due to gravity, unless you're in outer...

Is it possible to modify the TI Sensor Tag firmware to make communication between Sensor Tags possible?

bluetooth-lowenergy,communication,sensor,firmware,texas-instruments

Unfortunately, SensorTag is a Slave device and cannot be changed to a Master. Thus, it only accepts incoming connections and has not any capability to establish a connection to an another remote device. You can invest in a CC2541 BLE Mini Development Kit from Texas Instruments: http://www.ti.com/tool/cc2541dk-mini Since the firmwire...

java - how to simulate an ECG (electro-cardiogram)

java,random,plot,sensor,graphing

Why don´t you try modulating your random signal with a sin(t) function: long n = 0; double randomWeight = 0.5; while(true) { nextVal = range.getRandomValue(); double temp = AMPLITUDE*(randomWeight*((double)nextVal)+(1.0-randomWeight)*Math.sin(2.0*Math.PI*((double)n)*WIDTH_FACTOR)); nextVal = (long)temp; n++; System.out.println(nextVal); StdDraw.point(prevVal, nextVal); StdDraw.line(t-1, prevVal, t, nextVal); StdDraw.show(100); prevVal = nextVal; t = (t+1) % 100; if(t...

I2C communication between pic32 and MPL3115A2 Altitude/Pressure Sensor

arduino,sensor,i2c,pic32

You should look at Freescale's app note AN4481, which is referred to by the datasheet. Page 5 shows the single-byte read operation which is what you are doing, except that the register address write must not be followed by a STOP but instead uses a REPEATED-START. I'm not familiar with...

How control the embedded sensors on smartphones via Matlab

android,matlab,usb,signal-processing,sensor

As I teach (to my students) in such cases: "Google is your friend.", but I don't remember ever this lesson for me. In the Matlab File Exchange (http://www.mathworks.com/matlabcentral/fileexchange/40876) there is a free toolbox for analyzing output data. Of course, in the smartphone must be installed an application: SensorUdp (https://play.google.com/store/apps/details?id=jp.ac.ehime_u.cite.sasaki.SensorUdp). Matlab...

How to integrate temperature, pressure, humidity sensors into a single table in MySQL?

mysql,sensor,wireless

Here is the tutorial See here. Moving further, you need to have tables like this, // CREATE TABLE `your_database`.`tempmoi` ( `id` INT( 255 ) NOT NULL AUTO_INCREMENT , `temperature` VARCHAR( 255 ) NOT NULL , `pressure` VARCHAR( 255 ) NOT NULL , `humidity` VARCHAR( 255 ) NOT NULL , `timestamp`...

2 questions about this simple 1D Kalman case

position,sensor,robot,kalman-filter,proximitysensor

I'm not familiar with that video at all, but he might mean that if you repeatedly add process noise (P = FPF' + Q) but never reduce P via measurement, then P can only increase. In general, though, I would caution you against considering the covariance matrix P as...

Writing data from a sensor to a file

python,sensor

f.write(textdata+'\n') will get your job done When you use f.write('textdata\n') , Then it will treat "textdata" as a string just like "anmol" and not as variable name so the value is not substituted, However , removing it outside the "...." will get you desired results....

Filter data using histogram in C

c,data,arduino,range,sensor

The filter I have ended used is a multiple mean. I process the mean of all values, then discard those values over a threshold from the first mean and then I compute the mean of the left values.

Suitable sensors in iPhone to pick the user interaction

ios,iphone,swift,sensor

The iPhone has accelerometers, gyros, and GPS. With these, you can monitor motion of the phone, sudden shocks(like when the phone is picked up and put down), orientation, and over all motion. If outside, you can also use the GPS to pick up on motion and position (lat, long, course,...

How many sensors will work at a time in an Arduino for Home automation?

arduino,microcontroller,sensor,pic,home-automation

If the sensors use I2C then the limit is 128 devices on the bus, but they each have to have a unique address which are sometimes "hard-coded" on the device by the manufacturer. The Arduino Wired library is used to read/write I2C and it only takes two pins. I2C is...

How can I display info from a sensormanager class in an android project?

android,android-activity,sensor

The values measured by the sensor are received through the onSensorChanged method. Thats why you had to implement the SensorEventListener and register your class as the listener. This will get called whenever the value read by the sensor changes so you can just do whatever you need to do to...

How to make full body with PhysicsFactory.createTriangulatedBody() and EarClippingTriangulator in andEngine/Android

android,box2d,andengine,game-physics,sensor

SOLVED! Ok so the idea to check if our player body left the body of our path is to count borders playerbody passes. So in contactlistener we make beginContact to add one to some int variable (lets say bordersPassed) and endContact subtracts one from it. So when our player is...

Understanding Two's complement to float(Texas Instruments Sensor Tag)

python,floating-point,sensor,twos-complement,texas-instruments

On disk and in memory integers are stored to a certain bit-width. Modern Python's ints allows us to ignore most of that detail because they can magically expand to whatever size is necessary, but sometimes when we get values from disk or other systems we have to think about how...

Quadrature sensor sinus signal to distance value

c,algorithm,math,methods,sensor

If your analog signals are roughly sinusoidal then you can think of them as the sine and cosine of the phase angle (one full 2mm travel would be 2 * pi radians of phase). In C (and other languages) you can use the atan2 function to convert from your analog...

How to get temperature value from DS18B20 voltage

controller,arduino,hardware,sensor,temperature

You need to connect the 18B20 to a microcontroller, or a 1-wire host controller, connected to the microcontroller. (The difference is whether you want to write your own 1-wire protocol code ... go with the host controller). You'll get a digital value for the temp, no ADC required.

When using accelorometer application Crashes

android,crash,sensor

as your logcat said, java.lang.SecurityException: Requires VIBRATE permission you need Vibrate permission. so you need add following line into manifest file: <uses-permission android:name="android.permission.VIBRATE"/> ...

Can I save sensor data of android wearable(MOTO 360)?

android,sensor,android-wear,moto-360

You can write on the memory of your wearable, yes, but careful about the storage capacity. Just declare the file as you would on any other Android devices, and it should do the trick. However, you will have to work a little on the data given by the sensor, as...

Retrieving heart rate data from Android watch face service

service,sensor,android-wear,watch

Check if you requested android.permission.BODY_SENSORS permission in your both mobile and wearable AndroidManifest. Also, look into the logcat of your wearable device and grep for android.permission.BODY_SENSORS....

android values upload database with json

android,json,database,tags,sensor

If you want to upload your values to mySql database here is the steps : 1 - create table on the server with the fields needed. 2 - write php or any server side code to get the values from client 3 - implement the code in android JOSNParser.java import...

when music pause, Which sensor does galaxy S3(or S4 ….) use? [closed]

android,sensor,galaxy

Sample Code to detect phone flipping could look like this: http://android-er.blogspot.in/2011/02/detect-phone-flipping.html So basically you should use the accelerometer of your smartphone and place your custom code to onSensorChanged...

Is there any way to retrieve display brightness and light sensor value of iPhone?

ios,iphone,jailbreak,sensor,brightness

Located in private BackBoardServices.framework: float BKSDisplayBrightnessGetCurrent(); As for light sensor, couldn't find any methods to retrieve it's value. There're only three methods: check for existance of the sensor, enable/disable auto-brightness....

vhdl-ultrasonic sensor(hc-sr04)

vhdl,sensor,fpga

Problem solved, code is working. I was giving 3.3V to sensor as Vcc, then I realized that I should give 5v. It worked. Thank you for everyone.

What if the computation inside a listener is slow than the listener's update?

java,android,listener,sensor

There's 2 case scenarios: If the callback is asynchronous then it will spawn a new thread every time the method is called. This means that many of these methods can co-exist at the same time. If the callback is synchronous then it will spawn in the same thread (this is...

Acessing/Adressing variables with strings and int in Arduino

c++,c,string,arduino,sensor

There are a few issues with your code. First you can't get the value of a variable or a define by dynamically using a string that is the name of the variable. It doesn't work that way in C. The easiest approach is to use an array and then just...

Detect vibration with Android accelerometer

android,accelerometer,sensor,detect,vibration

Real answer- you're going to need to study DSP to get good results. This is a non-trivial problem. Quick overview- when a vibration occurs, you're going to see a sinusoidal attenuating wave pattern (the attenuating signal after the main vibration is called "ringing" and is a bad thing for us-...

Telosb with GPS

networking,gps,sensor,wireless

All GPS modules support the NMEA protocol, so a system that should work with different GPS chips, will use that NMEA protocoll. Additionaly GPS modules support their own binary protocoll, but by default the NMEA protocoll is enabaled. Systems that reads from a GPS module, usually allow to configure the...

Pairing android app with Bluetooth tire pressure sensors and getting real time data from it

android,bluetooth,real-time,sensor,connectivity

This is one of those question.... First thing you need to do is to find out what profile the sensors are transmitting data with. For example, if it turns out to be Serial Port Profile - which is the most common one, you can literally copy and paste android chat...

Arduino + HC SR04 Ultrasonic + Potentiometer

arduino,sensor,uno

I really do not understand what you mean: "I want to stop the distance sensor measurement when e.g. the sensor doesn't detect any object within 5cm(5cm being the min value set through the potentiometer)" Then left open for you to put the desired function PS: Sorry for my delay, I...

Proximity sensor in Swift (from Objective-C)

objective-c,swift,sensor,proximity

Here's my take on this. func activateProximitySensor() { let device = UIDevice.currentDevice() device.proximityMonitoringEnabled = true if device.proximityMonitoringEnabled { NSNotificationCenter.defaultCenter().addObserver(self, selector: "proximityChanged:", name: "UIDeviceProximityStateDidChangeNotification", object: device) } } func proximityChanged(notification: NSNotification) { if let device = notification.object as? UIDevice { println("\(device) detected!") } } ...