# Does proximity work in the CodeBot?

**URL:** <https://community.firialabs.com/t/does-proximity-work-in-the-codebot/242>\
**Category:** CodeSpace\
**Tags:** codebot\
**Created:** [March 29, 2026, 6:52pm UTC](https://community.firialabs.com/t/does-proximity-work-in-the-codebot/242 "2026-03-29T18:52:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lceponis](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.firialabs.com/lceponis/32/177_2.png) [@lceponis](https://community.firialabs.com/u/lceponis)\
**Post date:** [March 29, 2026, 6:52pm UTC](https://community.firialabs.com/t/does-proximity-work-in-the-codebot/242/1 "2026-03-29T18:52:36Z")

</div>

Hi,

I’m using sandbox environment (Sumo Garden exactly) and codebot. I’m trying to use proximity sensors and avoid the obstacles, but I cannot get it working. Detection reports “false” everytime, event the sensor hits the object.

Here is the piece of code, that will hit the object, but report false in the proximity sensor. Is that room some kind of special?

from botcore import \*

from time import sleep

motors.enable(True)

while True:

```
motors.run(RIGHT,-25)

motors.run(LEFT,-15)  

kliutis=prox.detect(7,90)

leds.prox(kliutis)

print (kliutis)

sleep (1)

```

---

<div class="post-metadata">

**Author:** ![dewing](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.firialabs.com/dewing/32/14_2.png) [@dewing](https://community.firialabs.com/u/dewing)\
**Post date:** [March 30, 2026, 11:00pm UTC](https://community.firialabs.com/t/does-proximity-work-in-the-codebot/242/2 "2026-03-30T23:00:22Z")

</div>

Good question! A little bit sad answer… The prox sensors are currently disabled in the simulation environment. Reason is, we had some students using older Chromebooks that just couldn’t handle the computational load of ray-casting prox probes into our larger environments… However, now that you asked, we _could_ make a setting to enable them for those with fast-enough computers (which is most computers nowadays!)  
I’ll make a note to do that on our next CodeSpace release… will keep you posted.

---

<div class="post-metadata">

**Author:** ![lceponis](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.firialabs.com/lceponis/32/177_2.png) [@lceponis](https://community.firialabs.com/u/lceponis)\
**Post date:** [April 1, 2026, 4:08am UTC](https://community.firialabs.com/t/does-proximity-work-in-the-codebot/242/3 "2026-04-01T04:08:01Z")

</div>

> [@dewing](#):
>
> rs (which is most computers nowad

Many thanks in advance. It is a very powerful sensor that is not so obvious to students.
