Finding someone to help me changing a message


Here's what I found in other file.

Sending 100 "F" out serial port? Seems more like a delay loop
Must be more files. Does going to top of drive and putting *.aia reveal any more files?

I think the messages could be in the Arduino ".ino" file. Re-name the extension to ".txt" and upload it here.

This is all there is

image

Seems the developer only provided their "first attempt" files...

Hmm - that certainly isn't the Sketch for the Robot.

Curtis - where did you find that Sketch (.ino file). A Sketch is the 'heart' of an Arduino. The one you have posted is not the one for the Robot, there should be another one somewhere......

Below is the communication portion of the Arduino program. As mentioned the original files are the BotAlert.aia and the BotAlert.apk. The program works great. I built a new type robot and was hoping to be able to change the message as mentioned above. I did not see where those messages came from in the app and thought that I was just missing it.

/*
Serial communication notes
A = First Circuit Completed
B = Second Circuit Completed
C = STOPPED!!
E = Erase
*/

#include <SPI.h>
#include <Pixy2.h>

Pixy2 pixy;

long previousMillis = 0; // last time update
long previousMillis1 = 0; // last time update

byte circuitsCompleted = 0;
long int counter = 0;

unsigned long currentMillis = millis();

void setup()
{
Serial.begin(9600);
pixy.init();

//Wait until connected to BotAlert app
bool msgReceived = false;
char msg[1];

while (!msgReceived)
{
while (Serial.available())
{
Serial.readBytes(msg, 1);
msgReceived = true;
}
}

{
currentMillis = millis();

/Sending the counter only every so often to keep
Bluetooth buffer from overloading
/
if (counter % 100 == 0);
{
Serial.print("E");
Serial.print(counter);
}
counter++;

delay(10);

pixy.line.getMainFeatures();

if (pixy.line.barcodes->m_code==1 && previousMillis1 > previousMillis) // end of second circuit
{
digitalWrite(relayPin, LOW);
motors.stop();
Serial.println("EB");
delay(43200000);
}
else if (pixy.line.barcodes->m_code==2) // change cleaning circuit
{
if (circuitsCompleted == 0)
{
Serial.println("EA");
circuitsCompleted = 1;
}
previousMillis1 = currentMillis;
}

Difficult to follow the code when there is only a portion of it. It appears to be sending letters.....

A = First Circuit Completed
B = Second Circuit Completed
C = STOPPED!!
E = Erase

......representing the messages you are concerned about but this (comms) is inside the Setup() procedure when it would be expected to be in the Loop() procedure. It has a highly unusual time interval of 12 hours set with a Delay()?

On the App side, the Project is incomplete, only the receipt of 'F' from Arduino is handled ('F' isn't in the above list). Also we can see that much of the App code has been scraped from the forum - that's not a bad thing, so long as it's understood. The time interval for receiving data is set to an ambitious 1 millisecond however.

So Curtis, we can see the process is that the Arduino sends command letters to the App and that would then display the messages you wish to modify. Clearly the App Project is incomplete but that would not be an issue if the Arduino Sketch is complete.

The missing part of the Arduino code is just the sensor and motor commands. The first portion of the Arduino code (see below) is just exactly that, notes and is not an active part of the code. The active part is the Serial.println("EA"); and Serial.println("EB"); of the code which prompts the phone message shown earlier.
/*
Serial communication notes
A = First Circuit Completed
B = Second Circuit Completed
C = STOPPED!!
E = Erase
*/

1 Like

We can see that - but is that all or are there supposed to be other signals sent to the App? e.g. 'F' seems to be required. Also, why are letters being combined (e.g. 'EB'). If that means Erase Second Circuit Completed?

Is that the only message to be changed?

1 Like

...also, App Inventor can process the messages much more efficiently if the signals/flags are integers rather than letters.

Chris, I am going back through all my emails with Mike (the young man who was helping me) which go back to 2016 looking for more information. Also, the messages I am looking to change are the "circuit one completed" to "sterilization beginning" and "circuit two completed" to "sterilization completed".

Chris,
Below is an email from Mike which explains some of the files.

5/8/2016 Arduino project help

Curtis,

Attached is BotAlert.apk, a modification of the Android App I used when we worked on your project. I displays numbers from a counter to a screen. When it received the letter F, it reports that the robot has finished whatever it is doing and chimes several times. Not a standard notification, but it will definitely get your attention. To install the app you will likely have to enable installation of 3rd party apps since I have not uploaded it to the Android market.

I have also attached the source code (BotAlert.aia) so that you can tinker with the app if you choose (you must import the file into App Inventor to make modifications). If there's a quick change you'd like me to make, feel free to ask.

I've also attached a simple Arduino sketch that shows you how to interface with the app. All it does is simulated counting to 100 and then send the F signal for Finished. All of this can be modified relatively easily to add other functionality such as error codes if you wish. I'm more than happy to show you how if you're interested.

-Mike

1 Like

Hello Curtis

So Mike never gave you the original App Inventor Project (BotAlert.aia only concerns itself with the 'Finished' message) nor the original Arduino Sketch with all messages catered for?

@ewpatton is it possible for you to transfer Mike's projects to Curtis?

We can only move projects from accounts where we can verify that the person requesting the move has access to both accounts (typically done by sending an email from both accounts in question).

I am not a lawyer and cannot offer legal advice. Based on my reading of the situation, it sounds like you would need to have the estate involved because ownership of the account technically would go to those named in a will or to the appropriate party as determined by an estate court in the appropriate jurisdiction.

That would be the case in the UK too, unless proof of ownership was available to show the files belong to the company the person was working for.

I do not have access nor do I want to ask. I want to thank everyone for their help, time and effort in helping me. I will continue to go through my notes and emails. If I find something of interest, I will be back.
Once again, thank you.
Curtis

1 Like

OK Curtis

We are of course happy to help when you are ready.