Hey everyone, new member here so sorry if I don’t ask the question 100% correctly or have right information since to be honest I’m not really sure what I’m doing I’m still learning as this is my 1st year of coding.

After seeing many videos about AI chatgpt type cheating (like the works of chromalock & others) I thought it was pretty cool, although i’m against cheating because it just ruins your chance to actually learn the information which is the whole point of school I thought it was cool how they used esp32 controller to get data from and to the calculator and wanted to embark on a similar less malicious mission

I started by soldering wires to the positive gnd tip & ring pads just like the cheaters did, but didn’t install any cameras or malicious items, my goal was to make a chat program between two calculators using ESP-NOW as it’s a project to perfectly combine some of my skills. I’ve purchased 2 ti84 plus calculators as well.

I’m using CBL2 and other various method but nothing seems to be working any advice, are there any projects similar to this? My tip and data are always reading HIGH and i get 112 edges every time I try to receive send() or other variables, Once I get this working i’m 90% done with my project since I just need to handle send and do a couple of statements and then implement ESP-NOW

Any help is appreciated thank you! 😁
How are you determining that there are 112 edges if your code always sees the lines sitting high? Are you looking at it with a logic analyzer, or what?

In order for anybody to be much help you'll really need to share some of your code and ideally a schematic of how you've connected it up.
hey sorry my other message didn’t send, I haven’t been able to replicate the issue here’s my code i’ll go into further detail next:


Code:
#include "CBL2.h"
#include "TIVar.h"
#include "TICL.h"


#define TIP_PIN   4   
#define RING_PIN  3   

CBL2 cbl;
const int lineRed   = TIP_PIN;
const int lineWhite = RING_PIN;

#define MAXDATALEN 255
uint8_t header[16];
uint8_t data[MAXDATALEN];

// Forward declarations
int onReceived(uint8_t type, enum Endpoint model, int datalen);
int onRequest(uint8_t type, enum Endpoint model, int* headerlen,
              int* datalen, data_callback* data_callback);

void setup() {
    Serial.begin(115200);
    delay(200);
    Serial.println();
    Serial.println("ArTICL HelloWorld – XIAO ESP32-C3");
    Serial.println("TIP = GPIO4 (D2), RING = GPIO3 (D1)");

    // Start with pins as inputs just to be safe
    pinMode(TIP_PIN, INPUT);
    pinMode(RING_PIN, INPUT);

    // Tell CBL2 which pins are used for link
    cbl.setLines(lineRed, lineWhite);


    cbl.resetLines();
 

    cbl.setupCallbacks(header, data, MAXDATALEN,
                       onReceived, onRequest);

    Serial.println("Ready: use Send(Str1) and Get(Str1) on the calc.");
}

void loop() {
    // Poll link layer
    int rval = cbl.eventLoopTick();
    if (rval && rval != ERR_READ_TIMEOUT) {
        Serial.print("eventLoopTick error: ");
        Serial.println(rval);
    }
}

int onReceived(uint8_t type, enum Endpoint model, int datalen) {
    if (type != VarTypes82::VarString) {
        Serial.println("Received invalid data type (not string)");
        return -1;
    }

    String str = TIVar::strVarToString8x(data, model);
    Serial.print("Received from calc: ");
    Serial.println(str);

    return 0;
}

int onRequest(uint8_t type, enum Endpoint model, int* headerlen,
              int* datalen, data_callback* data_callback)
{
    if (type != VarTypes82::VarString) {
        Serial.println("Received request for invalid data type");
        return -1;
    }


    String hello = "Hello, world! :)";

    int rval = TIVar::stringToStrVar8x(hello, data, model);
    if (rval < 0) {
        Serial.println("stringToStrVar8x failed");
        return -1;
    }
    *datalen = rval;

   
    memset(header, 0, sizeof(header));
    TIVar::intToSizeWord(rval, header);
    header[2] = VarTypes82::VarString;
    header[3] = 0xAA;
    header[4] = 0x00;
    *headerlen = 13;

    Serial.println("Sending to calc: " + hello);
    return 0;
}


the whole edges thing was generated by a program made from chatgpt honestly i haven’t been able to get it back, im currently using a esp32 c3 ive been pulling my hair about why i cant get this working i just dont understand it to be quite honest, if theres anything you can do or tell me please do Ive also attached an imgur of my wiring

https://imgur.com/a/yu2Tzf6

when i use send() or get() nothing happens and also my keyboard input is super laggy i have to press down with a lot of force for the keys to even register but it ceases to be a problem when i upload different code
Looks like you've started with one of the ArTICL sample programs; without looking too closely at your code to see what's changed it looks reasonable. https://github.com/KermMartian/ArTICL/blob/master/examples/HelloWorld/HelloWorld.ino

It also looks like you're using a Seeed XIAO ESP32C3, so for my own reference here are the arduino core pin mappings and board pinout.

dexter5895 wrote:
also my keyboard input is super laggy i have to press down with a lot of force for the keys to even register but it ceases to be a problem when i upload different code
That sort of issue usually indicates one of the link port lines is being held low, so I'd suggest starting out by actually measuring the voltage on the lines and going on to experiment with your code to make it stop doing that (if indeed they are being held low).
Tari wrote:
Looks like you've started with one of the ArTICL sample programs; without looking too closely at your code to see what's changed it looks reasonable. https://github.com/KermMartian/ArTICL/blob/master/examples/HelloWorld/HelloWorld.ino

It also looks like you're using a Seeed XIAO ESP32C3, so for my own reference here are the arduino core pin mappings and board pinout.

dexter5895 wrote:
also my keyboard input is super laggy i have to press down with a lot of force for the keys to even register but it ceases to be a problem when i upload different code
That sort of issue usually indicates one of the link port lines is being held low, so I'd suggest starting out by actually measuring the voltage on the lines and going on to experiment with your code to make it stop doing that (if indeed they are being held low).



yep yeah lol you were on the dot i ran

Code:
const int TIP_PIN  = 4; 
const int RING_PIN = 3; 

void setup() {
  Serial.begin(115200);
  pinMode(TIP_PIN, INPUT_PULLUP);
  pinMode(RING_PIN, INPUT_PULLUP);
}

void loop() {
  int tip  = digitalRead(TIP_PIN);
  int ring = digitalRead(RING_PIN);

  Serial.print("TIP=");
  Serial.print(tip);
  Serial.print("  RING=");
  Serial.println(ring);

  delay(200);
}


just printed out tip=0 ring=0 pulled out the lines on the calculator still tip=0 and ring=0 the only way i could get it to change was putting my finger on it which made both go to 1 any idea what this means?
You have the ground (base) connected as well as the tip and ring, right?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement