# Orientation / motion sensors deprecated

**URL:** https://discourse.processing.org/t/orientation-motion-sensors-deprecated/1640
**Category:** p5.js
**Created:** [July 9, 2018, 10:47pm UTC](https://discourse.processing.org/t/orientation-motion-sensors-deprecated/1640 "2018-07-09T22:47:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zackpi](https://avatars.discourse-cdn.com/v4/letter/z/b4bc9f/32.png) [@zackpi](https://discourse.processing.org/u/zackpi)
#### Post date: [July 9, 2018, 10:47pm UTC](https://discourse.processing.org/t/orientation-motion-sensors-deprecated/1640/1 "2018-07-09T22:47:50Z")

</div>

Hi, this is my first time using p5.js and javascript for that matter. But I came upon this warning/error while running this code from one of the getting started pages on the p5.js website:

function setup() {  
createCanvas(640, 480);  
}

function draw() {  
if (mouseIsPressed) {  
fill(0);  
} else {  
fill(255);  
}  
ellipse(mouseX, mouseY, 80, 80);  
}

The error:

Use of the orientation sensor is deprecated. p5.js:46753:6  
Use of the motion sensor is deprecated. p5.js:46753:6

Just wondering what’s going on here and is there a new way to get the mouse coordinates? or is that not the problem here? Thanks!

---

<div class="post-metadata">

### Author: ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)
#### Post date: [July 9, 2018, 11:10pm UTC](https://discourse.processing.org/t/orientation-motion-sensors-deprecated/1640/2 "2018-07-09T23:10:02Z")

</div>

Hmm that’s strange. Your code works fine for me, and I don’t see any warning.

Honestly this is probably just a quirk and can safely be ignored.

---

<div class="post-metadata">

### Author: ![tcorica](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@tcorica](https://discourse.processing.org/u/tcorica)
#### Post date: [July 30, 2018, 5:05pm UTC](https://discourse.processing.org/t/orientation-motion-sensors-deprecated/1640/3 "2018-07-30T17:05:27Z")

</div>

Got the same warning, just after updating FireFox, July 30, 2018. Did not see the warning before I did the upgrade.

–Tim

---

<div class="post-metadata">

### Author: ![siusoon](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@siusoon](https://discourse.processing.org/u/siusoon)
#### Post date: [August 11, 2018, 12:14pm UTC](https://discourse.processing.org/t/orientation-motion-sensors-deprecated/1640/4 "2018-08-11T12:14:45Z")

</div>

same here but apparently it works ok if you ignore the errors. (Mac OS + FireFox 61.0.2). /soon
