SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
User avatar
By Dillond
#224356
I am trying to use the HC-SR04 Ultrasonic sensor to measure distance through a very basic program of just sending the trig pulse and receiving the echo pulse. The circuit and the code work perfectly fine with the Redboard, however when I move it over to the Redboard Artemis the code does not work. Rather than printing the distance, it just prints 0 inches over and over. Does anyone have any ideas of why this sensor would not work with the Artemis or how to fix it? As I said, using the exact same code and wiring works on the Redboard.
User avatar
By TS-Russell
#224363
Thanks for reaching out to us on this.

We have not yet released code for this set-up on the Artemis. The Artemis is radically different than Arduino. Some code is written specifically to use some parts inside an ATmega328 that you find on an Uno and those devices don't exist on the Artemis or work differently. That can cause the code to either not compile or malfunction.

It might be best to rewrite the code a few different ways to see what works for that set-up, or hopefully someone who has an working example will stop by and share their code.

Best of luck!
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum