# Tag Info

5

Chris is right, the problem is that the mechanical contact of the switch is bouncing. However, I disagree with his statement that the most elegant solution is polling. Polling is very inefficient for the task of counting how many times a button was pressed, and so I decided to post my own answer for clarification: Interrupts are what you want. Polling is ...

4

I'd suggest two possible approaches. Use a 'heartbeat' to transfer a well known state packet at a fixed frequency that fits within your 'speed budget'. In this case, you never send ad hoc messages directly from the PC or MCU, all you can do is update the state packet which will be sent at the scheduled time. Put a hard limit on your 'transmission budget' ...

4

There is a bug in the implementation of sleep/wakeup on Create 2 which was fixed in release-3.8.2 for robots with an older processor, or release-stm32-3.7.7 for robots with a newer processor. To receive a code update that will (hopefully) fix your issue, please e-mail create@irobot.com, referencing this post. Please note that while I'm an iRobot employee, ...

3

Beaglebone USB When you plug a USB cable between the USB B plug of the Arduino Uno and the USB A plug of the Beaglebone Black, the Beaglebone should be able to talk and listen to it the same way any other Linux distribution talks and listens to any other CDC class USB peripheral. On the Beaglebone, a CDC class USB peripheral can be read an written to ...

3

According to the Arduino reference for Servo.attach( ), you should be using pins 9 and 10, not 0 and 1. Note that in Arduino 0016 and earlier, the Servo library supports only servos on only two pins: 9 and 10. Verify that you are setting the proper pin number in code. Specifically, look at these lines in your originally-posted code: void setup() { ...

3

I rewrote your program a bit. Not tested since I have no servos. #include <Servo.h> Servo ULF; // Upper left front servo Servo LLF; // Lower left front servo byte index = 0; int commandnum=1; int steps = 0; // position of LLF servo int partnum = 0; // unused for now String command = ""; // the command we're building char in; // ...

3

What your experiencing is known as "button bounce". When you push a standard pushbutton, it actually makes and breaks contact many times very quickly for a few microseconds, usually enough to make the processor detect between 10 and 100 pushes, or more. There are many different methods of "debouncing" a pushbutton. The easiest approach is to add a small ...

3

There is no right answer to this, and I'm sure you already know (or can guess) all you need to solve this problem. However The first obvious thing to say is that downstream devices must be capable of dealing with the flow of data, both in the long term and in the short term. In the short term, devices use buffering to cope with the flow. In the long term, ...

3

The Roombots example you posted does not use a level shifter because they are using the Create USB cable to talk to the robot. If you are planning to use this cable, you do not need the level shifter. If you are not planning to use this cable and instead will be interfacing directly to the Raspberry Pi serial pins (on the GPIO header), then the answer below ...

3

It looks like you're doing this in a very round-about manner. You said, The matlab function in sumlink is supposed to read the received ASCII characters and add them to a variable until it reaches the end character '>'. It looks like you are thinking the "signed numbers" are coming in as a string that you'll read one digit at a time, where the entire ...

3

The 68x series has a Mini-DIN connector on the top surface, toward the robot's right side, but it's now under the translucent diffuser surrounding the buttons. It is held in by snaps. Lift the handle, stick your fingers under, and pull the plastic piece up and out. Please note that I am an iRobot employee, but the postings on this site are my own and don't ...

3

The most common manipulability measure is by Yoshikawa [1] which is purely kinematic, ie. it ignores dynamics such as inertia and motor torques. It is simply $$\sqrt{\det( J J^T)}$$ where $J$ is the manipulator Jacobian that gives spatial velocity in world coordinates. The measure says something about how spherical the 6D velocity ellipsoid is. The ...

2

At 1st glance: 115200 == 115.2 bits per millisecond == ~12.8 bytes per millisecond (assuming 1 stop bit) Is that a valid way to calculate timing for serial transmissions? Very simplistically, this is OK - but don't forget any start and parity bits also, and don't forget any protocol overhead along the bluetooth links Also, given my specific ...

2

I think the form of your question is wrong. The problem is not that you've improperly calculated how much data-per-second can be thrown at the microcontroller; it's that you have no way for the microcontroller to indicate its readiness to receive the next command. To put it another way, if you attempt to solve this problem by precisely calculating how ...

2

I was having the same problem. I finally solved the problem. This document says that you have to put CR LF (\r\n) characters after you send something in AT mode. But in the arduino code that you use, uses the Serial.write command to send command. But Serial.write command doesn't put CR LF characters. So I used Tera Term to send command. First connect PIN34 ...

2

Once you have the image stored as a file, you can transfer that using any one of dozens of file transfer protocols, as long as it is supported by both ends of the link. We would really like to help, but it's impossible for anyone to read your mind and see what you put on both ends of the link. And I certainly would like to help someone building a robot that ...

2

If I had to guess, I'd say mismatch on baud rates, but it's dangerous to guess. What you need is some old-fashioned debugging! Three possibilities: Bug in the app code Bug in the arduino code Problem with the interface/configuration First things first, get a serial cable and connect it to a terminal program (Window's HyperTerminal or Unix's screen). ...

2

The spec says hex 8000 as in hexadecimal (which I usually write in C/Python notation as 0x8000). Each byte is exactly two hexadecimal digits. So you can break 0x8000 into 0x80 and 0x00 and send them separately, which correspond to decimal numbers 128 and 0. You also have to know which to send first (referred as little-endian vs big-endian). The spec says [...

2

As I suspect you found out (based on your other question 7169), doing both over the same RF link will be more truble than it is worth, You could use ip as you sujested but this might turn out to be more truble than it is worth unless your main controller is a raspberry pi or BBB that already has native networking. I am assuming you are talking about a ...

2

The iRobot Create and Roomba may have a rather unusual 7-pin mini-din socket for their serial interface, but it is otherwise a fairly standard 5v serial port. Since the original iRobot Create cable no longer seems to be available, if you already have a USB serial adapter and don't want to buy the new iRobot Create 2 cable, then you may want to make your own ...

2

If it's a FTDI device, download the latest driver from http://www.ftdichip.com/Drivers/VCP.htm I assume its the original USB to Serial cable from iRobot you're using.

2

I think we need 5-3.3 bidirectional voltage shifter (not for camera) to communicate between raspberry pi and create controller, since serial communication protocols for Create uses 0-5 voltage range and Raspberry Pi uses 0-3.3 volt range. This dissimilarity might result in signal distortion between the two devices. For instance, raspberry pi might send 2.5V ...

2

Page 9 of the Open Interface specification gives the following instructions: Serial sequence: [137][Velocity high byte][Velocity low byte][Radius high byte][Radius low byte] It then gives special cases for the radius: Special cases: Straight = 32768 or 32767 = hex 8000 or 7FFF Turn in place clockwise = hex FFFF Turn in place counter-...

2

It's not entirely clear what you mean by "write and read at the same time" because that can refer to different contexts. It can be confusing because people tend to mix the meanings of full-duplex/half-duplex when switching back-and-forth in discussion of the hardware and software layers. True full-duplex serial communications requires hardware level ...

2

Scope showed data being sent to the robot. I discovered the console was enabled on the raspberry pi 3 and disabled it; the problem is now resolved. Specifically, run the following commands sudo systemctl stop serial-getty@ttyS0.service sudo systemctl disable serial-getty@ttyS0.service Then edit /boot/cmdline.txt and remove the following option from the ...

2

Seems like the code should work. I can suggest 3 things that might be of assistance. Make sure you have a prominent Common Ground Sometimes your PC isn't enough Increase the BraudRate on both devices. Most important make sure both devices are running at the same voltage. The Intel Edison is 1.8V without the Arduino Expander and the Arduino expander has a ...

2

You need to read and understand that datasheet. This board does not have addressing, so without additional hardware you can only have one per serial port. For a demonstration, use a USB-Serial cable connected between the motor controller and a computer. You can use any serial program you have to communicate with the motor controller. Examples of serial ...

2

Welcome to Robotics, Sam. You've posted your code and the errors you're getting, which is great. There are still a few pieces of information lacking, though. Unfortunately, it looks like the "datasheet" is pretty poor and there are several items that I would like to see that I can't find. With some information missing, here's the list of troubleshooting ...

2

Your code looks good, the device is probably sending you back bytes so you need to read them on the port. Adding to what you have, it would look something like this: import serial import time ser = serial.Serial("COM7", 115200) # open serial port print(ser.name) # check which port was really used ser.write(bytearray([128, 131, 135])) print ("commands sent")...

1

First off, there's no guarantee the wire colors in the iRobot cable match the colors in the cable made by Tensility. Step one is to get an ohm meter and see if the colors match the pins you expect. If they do, I wonder if you accidentally blew the resettable fuse? See the discussion at the end of the section entitled External Serial Port Mini-DIN Pinout on ...

Only top voted, non community-wiki answers of a minimum length are eligible