/////////////////////1234
Hello @anon62867724
Please read How to get the best out of this forum
Please post your code here in code tags as per the instructions in that tutorial.
Some photos would probably be helpful so people can see what you are working with.
Have you connected the grounds between the sampler and the Uno?
Thanks for the schematic of the EPS16Plus but I can't read it. I have tried downloading and zooming in but the text is a pixillated, unreadable blob.
If there is a pin called Ser_Out then, I guess, that's where to start. Do you have access to an oscilloscope to see if what is on that pin is serial data? Do you know what the baud rate is?
The problem with using a Uno for anything serial is it has 1 serial port, which is already used for the serial monitor, so you have to use software serial for anything else. If you are using the Uno's Rx and Tx pins then you have the added complication of conflicting with the serial monitor and not being able to use it. My preferred board is the Nano Every, which has a spare serial port.
Serial.begin(62500, SERIAL_7N1);
Do you know for sure that that is correct? 62500 Baud is not a rate I have ever heard of.
Here is my test code for serial, which takes data from serial port 1 on a Nano Every and sends it to the serial monitor:
// Receives data on serial port 1 and sends to the serial monitor with an index.
// Each character is on a new line.
// Receiving 0x00 resets the count to 0.
void setup() {
char fileName[] = __FILE__;
Serial.begin(115200);
delay(2000);
Serial.println("Serial monitor started");
Serial1.begin(9600); // Change this to what you need for your application
Serial.println("Serial 1 started");
Serial.println(" ");
Serial.println(sizeof(fileName));
Serial.println(fileName);
}
void loop() {
serialMonitor();
}
void serialMonitor() {
char RxTemp;
static uint8_t charCount;
while (Serial1.available() > 0) {
RxTemp = Serial1.read();
Serial.print(charCount);
Serial.print(" byte ");
Serial.print((byte)RxTemp, HEX);
Serial.print(" char ");
Serial.println((char)RxTemp);
++charCount;
if ((uint8_t)RxTemp == 0) {
charCount = 0;
Serial.println("charCount = 0");
}
}
}
Sorry, but a list of connections is completely useless. Please post a schematic, which you can draw with a pencil on paper. There's more about schematics in the forum instructions I linked to.
Photos of what you have would help too.
Thanks
so would you say it would not be possible to do this from a UNO? I am not sure if he was using a UNO or a NANO but i do remeber him stating that it was made for "UNO/NANO"
Uno and Nano are the same thing, just on different boards and presented differently. A Nano is a small Uno, but basically they are the same.
It's not that you can't do it on a Uno it's that you are adding a layer of difficulty that you don't need. You have a display on the Uno but you don't know if it works. The serial monitor is a great testing tool as you can send test prints to it easily and see if your code is doing what you think it's doing.
You've said the code was written by someone else, but what is you knowledge of coding?
You produced that schematic rather quickly, too quickly for someone who has not used software for creating schematics before, so I think you are familiar with the software.
If this were my project I'd use a Nano Every and the code I gave you as a first step just to see what is coming out of the ESP16. I use that code or a variant of it for testing all sorts of serial stuff. Once you know you are getting valid data then you can move on to trying to do something with it.
If you don't want to buy a Nano Every then modify my code to use software serial and see where that gets you.
That code takes whatever comes in on Serial1 and sends it to the serial monitor. You are looking for something that looks reasonable for what you might expect from the sampler. If it's nonsense then it's probably wrong, if it makes some kind of sense then you are on to something.
You will have to get the baud rate right but the rate in the code you presented is either wrong (because it's not a standard rate) or, if it really is that rate then it might be a problem (because it's not a standard rate). If it is a problem then I'm not sure what you do next, however part of this fun of this hobby is experimenting!
The only certain way to check the baud rate is to look at the data on an oscilloscope or logic analyser.
You don't use the same pins, not Rx and Tx, they are for the serial monitor. You have to define the pins. Do some searching on this forum, you will find loads about it.
Start here: https://www.arduino.cc/en/Reference/SoftwareSerial
Friend has just invited me for food and a drink so I'm off! No more replies from me for a while.
Have fun.
I had a quick look and the github comments suggest the originator of the code used an UNO or Nano. The code has softwareserial commented out and it looks he was using the hardware UART to receive the data.
As @PerryBebbington says, the pins for the hardware UART are routed to the on-board serial to USB adapter. You may be able to use these pins but if you're having problems with the code, then not having access to a serial port at a standard baud rate will really hinder the diagnosis.
If the serial port is meant to be internal to the unit, then it's possible that it uses a non-standard baud rate derived from an oddball crystal frequency (which is probably not such an oddball frequency in the synthesizer/audio world!)
Your best bet would be to get hold of an Arduino board with additional serial ports. Maybe a Mega or Nano Every. There was a variant of the 328P that had a second serial port if I remember. That might be an option too.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.