As in double up as a tuner @analogoutput?
Yes it (still) has. Just a matter of switching it on again.
The code contains a block that lets you choose what you see. I added this because I anticipated that a question like this would occur. I use the code with the SIMPLIFIED define defined. [Edit] I added 2 lines initially for displaying the frequency. Given the change in layout that needs a different value for the y-coordinate as well. They are commented out here. The frequency values change very erratically so that is why I left displaying them out. This could be entirely due to the input signals Iāve used so far.
#define SIMPLIFIED
#ifdef SIMPLIFIED
#define BEGIN_X 0 // Begin position of plot on x-axis
#define DISPLAY_ZERO_LINE 1
// #define FREQ_Y 0
// #define DISPLAY_FREQUENCY 1
#else
#define BEGIN_X 24 // Begin position of plot on x-axis
#define DISPLAY_AVERAGE_TR 1
#define DISPLAY_ZERO_LINE 1
#define DISPLAY_VERTICAL_MARKS 1
#define DISPLAY_VERTICAL_LINES 1
#define DISPLAY_VERTICAL_LINE_LEFT 1
#define DISPLAY_AVERAGE_TR 1
#define DISPLAY_AVERAGE_TL 1
#define DISPLAY_CENTER_VALUE 1
#define DISPLAY_DUTY_CYCLE 1
#define DISPLAY_FREQUENCY 1
#define FREQ_Y 12
// vertical position of plotted frequency in pixels
#endif
Definitely want to build one. The trigger looks like it works well. Can the trigger be set to a different position on the screen, like far left instead of in the center of the screen?
The short answer is: Yes, easy peazy. It is all done in software after all.
It is just a matter of reorganizing some coordinates. Have a look at the function dispInf():
void dispInf() { // Display of various information
float voltage;
// display vertical sensitivity
oled.setCursor(2, 0); // around top left
oled.print(vScale); // vertical sensitivity value
if (scopeP == 0) { // if scoped
oled.drawFastHLine(0, 7, 27, WHITE); // display scoped mark at the bottom
oled.drawFastVLine(0, 5, 2, WHITE);
oled.drawFastVLine(26, 5, 2, WHITE);
}
// horizontal sweep speed
// Code left out for clarity
// trigger polarity
oled.setCursor(75, 0); // at top center
if (trigD == 0) { // if positive
oled.print(char(0x18)); // up mark
} else {
oled.print(char(0x19)); // down mark ā
}
if (scopeP == 2) { // if scoped
oled.drawFastHLine(71, 7, 13, WHITE); // display scoped mark at the bottom
oled.drawFastVLine(71, 5, 2, WHITE);
oled.drawFastVLine(83, 5, 2, WHITE);
}
Note: the function is only shown partially.
If e.g. you swap the coordinates for displaying the vertical sensitivity with the ones used for showing the trigger polarity, you will effectively have moved the trigger to the left ( and the sensitivity to the right ). The draw commands follow this scheme: oled.drawFunction(x, y, length, color). The x-value varies from 0 to 127 and the y values vary from 0 to 63. Note however that if you change the positions like this, the visible sequence of walking through the menu items will change as well.
The funny thing is I was looking for a project like this two days ago! Looks like I can add this to the pile of things Iām trying to get finished excellent work!
This is extremely cool and helpful !!!
this looks cool, something I have been thinking of adding for a long time. Looking at Arduino compatible screens on taobao (China) I can see bigger ones (1.8 and 2.4") but they have more pins, is the project adaptable to those?
The schematic shows pinout GND-VCC-SCL-SDA for the OLED. As pointed out here, sometimes these OLEDs have that pinout and sometimes VCC-GND-SCL-SDA. For a build like Josās itās just a matter of keeping track and doing the wiring accordingly. A hypothetical PCB implementation with the OLED going directly into a header on the PCB would have to be designed either for one pinout but not the other, or with jumpers to choose the pinout.
The I2C protocol uses only four pins including ground and VCC. The other two are SCL and SDA, clock and data respectively. If the display has more pins that means it uses a different protocol so itās incompatible with this design.
Which is not to say itās not āadaptableā, just that there would be changes to the schematic and the code.
Yeah, if not for the pinout, it would be completely compatible, except for the code.
Hereās a display with 128x128 pixels, supports I2C. On the face of it this may be a good candidate for a larger display on the module. You still may have to adapt the code though.
Good info, Iāll check if there are other screens which are I2C compatible.
I found some on wish a short time ago.
These are the ones i picked up.
4pcs for $18.99
just bought a bunch to try with this project, ranging from about a dollar for a 0.96" to a whoipping 3 dollars for some of the bigger ones.
Jumpers would be a wise choice I think.
Iāve done a bit of searching but havenāt found any i2c displays with a resolution higher than 128 x 128. I wonder whether there is a technical reason for that. Any ideas?
At some point you reach the maximum practical refresh rate. The tighter the bottleneck the sooner that will be.
Hereās a link to a somewhat larger and higher resolution display I bought recently. It uses an 8 bit parallel interface with several control lines. You might get away with running that screen from an Arduino Uno or Nano, but to get the best out of it you need an Arduino Mega which has lots of data pins to spare.