# EV3

### Blocks

Please note:

&#x20;![](https://4213710887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwumhy9Amexb1fvjNOGl8%2Fuploads%2F3twsz7CCmv6TVi7Qta5v%2FEV3%20LabView.png?alt=media\&token=9c2fe5f5-b9d6-4f96-aa66-34b186c2f8f7) ![](https://4213710887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwumhy9Amexb1fvjNOGl8%2Fuploads%2FundRYaYnIauXQOUZm1WC%2FEV3%20Classroom.png?alt=media\&token=32bec9fc-66f8-41c2-b659-a1b439c48bdf)

The IR Seeker board can be used with the EV3 Labview software using our custom blocks.

[Download EV3 Blocks](https://s3.amazonaws.com/www.buildingblockrobotics.com/firmware/BBSIRSeeker.ev3b)

Once downloaded the blocks can be used like other ev3-g blocks. A very simple program to write the sensor value to the screen can be seen below:

![](https://4213710887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwumhy9Amexb1fvjNOGl8%2Fuploads%2F6vuLcMZxAAXIOWHAgGCh%2Fev3blocks.png?alt=media\&token=23473ef9-8185-4010-aa6e-46cd2bc4abd4)

There is no need to change the value 8 in the block.

![](https://4213710887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwumhy9Amexb1fvjNOGl8%2Fuploads%2F8LflqyNT93Kf9vqfIBrj%2FSample.PNG?alt=media\&token=753b5cec-ca98-4a7e-bd65-0aaf31406214)

The IR Seeker feature switches should be set to:

![](https://4213710887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwumhy9Amexb1fvjNOGl8%2Fuploads%2FNTQLWEEINvULZfBmkvvB%2FAdvancedPosition.png?alt=media\&token=ed3c1eed-2cfc-4b88-accb-3bb510922131)

### EV3 Python

Using EV3 Python:

```python
from pybricks.iodevices import I2CDevice

ir_sensor = I2CDevice(Port.S4, 0x08)

#read two bytes, one contains direction, one contains strength
ball_sensor_data = ir_sensor.read(2,2)

ball_position = ball_sensor_data[0]
ball_sig_strength = ball_sensor_data[1]
```

The IR Seeker feature switches should be set to:

![](https://4213710887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwumhy9Amexb1fvjNOGl8%2Fuploads%2FNTQLWEEINvULZfBmkvvB%2FAdvancedPosition.png?alt=media\&token=ed3c1eed-2cfc-4b88-accb-3bb510922131)
