Cannot disable sleep in passive mode for iRobot Create 2

I tried to disable sleep by pulsing the BRC pin low for one second every minute as suggested in the OI, but my Create 2 still goes to sleep after 5 minutes.

My firmware is r3_robot/tags/release-3.2.6:4975 CLEAN

The Create 2 is connected to an Arduino, and the BRC is driven by one of the Arduino pins. I verified on a DMM that the voltage is indeed toggling. I am able to both send and receive serial data between the Arduino and Create2.


  1. Initialize roomba. Connect serial at 115200 baud. Toggle BRC: high for 200 ms, low for 200 ms, then high again. Leave it high.

  2. Ask roomba to stream sensor data in passive mode. Wait 1 second after BRC toggle to give some extra time to wake-up. Then send opcode 7 (reset), wait for reset message to complete by looking for the last few characters, then wait another second for good measure. Next, send opcode 128 (start into passive mode), wait 100 ms to let opcode stick, then ask for stream of data (opcode 148 followed by number of packet IDs and the packet IDs themselves).

  3. Main loop: Echo data from Create2 to the serial-USB output of the Arduino so that I can view the Create2 data. The data sent by the Create2 look valid (good checksum) and are sent in the expected time interval of ~15 ms. The main loop also toggles the BRC low for 1 second every minute.

For the full gory details, the complete Arduino sketch is shown below

const uint8_t brcPin = 2; // Must keep this low to keep robot awake
long last_minute = 0;
long minute = 0;

// Initialize roomba
void roomba_init()
  Serial3.begin(115200); // Default baud rate at power up
  while (!Serial3) {}    // Wait for serial port to connect

  // BRC state change from 1 to 0 = key-wakeup
  // keep BRC low to keep roomba awake
  pinMode(brcPin, OUTPUT);
  Serial.println("BRC HIGH");
  digitalWrite(brcPin, HIGH);
  delay(200);  // 50-500 ms

  Serial.println("BRC LOW");
  digitalWrite(brcPin, LOW);

  Serial.println("BRC HIGH");
  digitalWrite(brcPin, HIGH);
  last_minute = millis()/60000;

  delay(1000);  // give some extra time to wake up after BRC toggle.

  Serial.println("Opcode 7: reset robot");
  Serial3.write(7);      // Reset robot
  // Discard roomba boot message
  // Last part of reset message has "battery-current-zero 257"
  char c = 'x';
  Serial.println("Gimme a z!");
  while (c != 'z') {
    if (Serial3.available() > 0) {c =; Serial.write(c);}
  Serial.println("Gimme a e!");
  while (c != 'e') {
    if (Serial3.available() > 0) {c =; Serial.write(c);}
  Serial.println("Gimme a r!");
  while (c != 'r') {
    if (Serial3.available() > 0) {c =; Serial.write(c);}
  Serial.println("Gimme a o!");
  while (c != 'o') {
    if (Serial3.available() > 0) {c =; Serial.write(c);}
  // Flush remaining characters: 32 50 53 54 13 10 or " 257rn"
  Serial.println("Gimme a newline!");
  while (c != 10) {
    if (Serial3.available() > 0) {c =; Serial.write(c);}
  delay(1000);  // allow extra time for opcode 7 to stick

  Serial.println("nOpcode 128: start OI in passive mode");
  Serial3.write(128);   // Start the Open Interface.  Passive mode. 
  delay(100);           // Allow some time for opcode 128 to stick (not sure if this is needed)
  Serial.println("Opcode 148: stream data packets");
  Serial3.write(148);   // Stream data packets (every 15 ms)
  Serial3.write(16);    //   Number of packet IDs
  Serial3.write(8);     //   Packet ID 8 = wall                       1 byte
  Serial3.write(9);     //   Packet ID 9 = cliff left                 1
  Serial3.write(10);    //   Packet ID 10 = cliff front left          1
  Serial3.write(11);    //   Packet ID 11 = cliff front right         1
  Serial3.write(12);    //   Packet ID 12 = cliff right               1
  Serial3.write(13);    //   Packet ID 13 = virtual wall              1
  Serial3.write(27);    //   Packet ID 27 = wall signal               2
  Serial3.write(28);    //   Packet ID 28 = cliff left signal         2
  Serial3.write(29);    //   Packet ID 29 = cliff front left signal   2
  Serial3.write(30);    //   Packet ID 30 = cliff front right signal  2
  Serial3.write(31);    //   Packet ID 31 = cliff right signal        2
  Serial3.write(41);    //   Packet ID 41 = velocity right            2
  Serial3.write(42);    //   Packet ID 42 = velocity left             2
  Serial3.write(43);    //   Packet ID 43 = encoder counts left       2
  Serial3.write(44);    //   Packet ID 44 = encoder counts right      2
  Serial3.write(45);    //   Packet ID 45 = light bumper              1

void setup() {
  // Open serial communications (through USB interface)
  // The serial output of the Create 2 is echoed from Serial3 to Serial
  // so that we can observe the Create 2 serial output on a computer.
  while (!Serial) {}   // Wait for serial port to connect
  Serial.println(F("Starting roomba test...n"));

  // Roomba serial commmunications
  Serial.println(F("Initializing comm to Roomban"));

long low_start_time;
boolean brc_is_low;
void loop() {
  // Read from Serial3 and echo results to Serial
  if (Serial3.available()) {
    uint8_t b =;
    uint8_t checksum = 19;
    if (b==19) { // First byte of reply stream is 19
      Serial.print("nStart at ");
      Serial.print(b); Serial.print(" ");
      while (Serial3.available() < 43) {}  // Wait for rest of data (buffer is 64 bytes)
      for (int I=0; I<43; I++) {
        b =;
        Serial.print(b); Serial.print(" ");
        checksum += b;
      Serial.print("Chksum ");
      Serial.println(checksum);  // 0 is good
    } else {
      // Probably an ascii message
      Serial.print(b); Serial.print(" ");

  // Pulse BRC low every minute for 1 second
  long now = millis();
  long minute = now/60000;
  if (minute != last_minute) {
    Serial.println("nnBRC LOW");
    digitalWrite(brcPin, LOW);

    last_minute = minute;
    low_start_time = now;
    brc_is_low = true;

  // 1 s low pulse width
  if ((now > low_start_time + 1000) && brc_is_low) {
      Serial.println("nnBRC HIGH");
      digitalWrite(brcPin, HIGH);
      brc_is_low = false;

Question: Creepy sleep paralysis experience?

So I get sleep paralysis only when I take naps in the daytime, never at night. But anyway, a few weeks ago I took a nap and had sleep paralysis. I didn’t see anything but I heard a creepy *** voice saying “deadddddd” over and over, and I had to force myself hard to wake up which is difficult to do. Is that just my imagination or could something else be happening? It was just really scary!

Question: Does having no early morning responsibility make your sleep schedule all sorts of wonky?

it’s a few days into no work and oh my god, I’m messed up. I spend some hours into the night looking for a job, being productive, making some food for tomorrow, cleaning, and then around midnight or so, everything has just started to go downhill and I just stay up playing video games or something. I haven’t slept yet and it’s 4 in the morning. Gahhhhhhh.

Wake display, via trigger and then have it sleep after n minutes?

We are looking at mixing a PIR (motion sensor) with a Raspberry Pi, such that the screen will turn on when motion in sensed and then sleep after a certain period of no sensed motion. The screen will be connected via HDMI and the OS will be Raspbian Jessie on a Pi 3.

What methods are available to be able to tell the display to wake and then put it stand-by?

For the timeout it appears /etc/kbd/config, with possibly:


Is this the right way to go about this, if the desktop environment is Pixel?

For wake, I am not sure? I will be using nodejs, if it makes a difference. Additionally, are there any other methods to have a Pi reduce power consumption on periods of inactivity?

Meditation, sleep paralysis, spinal vibration

I have meditated off and on since childhood, before I knew what it was, and since my 30s I have been interested in the spiritual concepts of Buddhism. I had an experience in 2010 wherein I awoke from sleep but could not move, yet my eyes were open, not my physical eyes. I could see a pale ceiling but could not look around. I was aware of my cat half-lying on my stomach, and he was purring. My ears popped, and suddenly I could hear differently, acutely. I heard footsteps ascending my stairs and the swishing sound like that of a robe. I heard footsteps cross to the left side of the bed. I was frightened, and the hair stood up on end on my arms and head, but I deepened my breathing and relaxed. I immediately felt a type of massaging, but not on my physical body, more the ethereal body, and also a warmth. The light massaging moved from left leg and foot to right leg and foot to left rib area to right rib area, and then I heard movement toward my head. The light in front of my eyes suddenly brightened, and my sinus passages popped loudly. I felt gentle pressure like hands cradling under my neck, and this pressure began to lift my head and shoulders upward, and I knew that I was being assisted out of body. Then my alarm went off and awakened me. I sensed a vibrational peace which lasted several minutes. Since that time, I have had several OOB experiences, always as I go to sleep or am awakening from sleep, some frightening, which set me back for a few years.

Recently, over the last 2 years, I have had several experiences after I fall asleep wherein I half awaken in that state again, and sometimes feel a presence near, but immediately I feel a very strong, pleasant, vibrational, almost humming flow of energy flowing from the base of my neck to the base of my spine and back again. I always fall back asleep easily.

I don’t know what is happening, and I have been trying to release any fear and simply let it be. I want to trust that this is some type of healing or spiritual progression process, but I feel that I have no guidance. Are there any Buddhist teachers who would be able to guide me through this? Any response or feedback would be extremely welcome!

My keyboard doesn’t work after sleep mode

I have a problem for some weeks with my keyboard when I leave sleep mode: the last doesn’t want to work.

Below, I put the piece of line that appear when I leave sleep mode, just before the log screen arises:

[9842.304965] ACPI error : Needed [Integer/String/buffer], found [Reference] 000000006951a5e9 (20170831/exresop-505)
[9842.305009] ACPI Exception : AE_AML_OPERAND_TYPE, While resolving operands for [LEqual] (20170831/dswexec-461)
[9842.305056] ACI Error : Method parse/execution failed _SB.BAT1._BTP, AE_AML_OPERAND_TYPE (20170831/psparse-550)

I reach to make it works again by loging in with an other user session previously closed (or my session if I closed it before switching into sleep mode or by loging in a first time, closing it and loging in again) thanks to the virtual keyboard (and finally, loging in to my own user session when I find back the keyboard)- I hope you understand my problem and understand that it’s not a really practical way to log in and fix the problem and it’s not really fast…

I tried to change my grub settings like that:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash atkbd.reset i8042.nomux=1 i8042.reset"


But it doesn’t seem to have any effects.

Last, the error appeared when I upgraded my distribution from ubuntu 16.04 to 18.04. But I had already had this problem with my ubuntu 16.04.

Good night, Albert

Change raspberry pi sleep time

I recently bought the 7″ touchscreen for my raspberry pi B 3 running Raspbian and and wanting to use it as a wall mounted display for a smart home project. However I would like the touchscreen to “sleep” or turn off sooner than the time that it’s set at now (I think 30 mins but I am not sure.) If there is a way to shorten that time and also retain the ability to “wake” the screen when touched would be amazing.

The second question would be, is there a way programmatically to “wake” the display? For example, if a notification shows up the screen would wake to show that.

Is there a good way to troubleshoot Mac battery drain issue during sleep?

The most recent instance of the problem was, last night at 11pm my Macbook Pro was charged to full, I disconnected the charger, closed the lip and put it there. This morning I turned it on and found that battery level was at 85%.

I know this question has been asked many times on this site, and on many other sites. I’ve read dozens of them, but it seems to me there has never been a satisfying answer ever. In pretty much all these pages that I read, people would suggest “try this, try that …” etc.

What i’m hoping for is that, we can look at some kind of system logs, find out exactly what happened, then do things based on some kind of evidence instead of trying things blindly.

I’ll summarize what I’ve done to mitigate the problem:

  • I installed sleepwatcher to automatically turn off WIFI when entering sleep. As far as I can tell this has worked quite well before I upgraded to Mojave. But this has stopped working since Mojave.
  • I disabled power nap.
  • I logged out iCloud completely
  • I turned off bluetooth
  • And some other things I found here and there. but again as I said earlier, these are just guesswork.

anybody knows some solid, systematic way to troubleshoot such issues? or please point me to the right direction ?