Remplace Atemega with Arduino

Hello evryone i have a question.. i'm really new to arduino,

I try to reproduce this project ( GitHub - H4ckd4ddy/bypass-sentry-safe ) This guy is using a Atemega328P to create his project i did try it but is not working quite well, what i will like to know is there any arduino nano or somthing wich can run this cod with out using and Atemega i just whant to be able uploud that cod to a small arduino bord and add the gpio and then just use it....

The cod is :

const int pin = 1;

void send_request(int command, int a, int b, int c, int d, int e) {
int checksum = (command + a + b + c + d + e);

pinMode(pin, OUTPUT);
digitalWrite(pin, LOW);
delayMicroseconds(2750);
digitalWrite(pin, HIGH);
delayMicroseconds(200);
Serial.begin(4800);

Serial.write((byte)0x0);
Serial.write(command);
Serial.write(a);
Serial.write(b);
Serial.write(c);
Serial.write(d);
Serial.write(e);
Serial.write(checksum);

Serial.end();
pinMode(pin, OUTPUT);
digitalWrite(pin, HIGH);
}

void reset_code(int a, int b, int c, int d, int e) {
send_request(0x75, a, b, c, d, e);
}

void try_code(int a, int b, int c, int d, int e) {
send_request(0x71, a, b, c, d, e);
}

void setup() {
reset_code(1,2,3,4,5);
delay(1000);
try_code(1,2,3,4,5);
}

void loop() {}

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Yes, the UNO or Nano should run the sketch without trouble.

const int pin = 1; // Serial TX pin

void send_request(int command, int a, int b, int c, int d, int e)
{
  int checksum = (command + a + b + c + d + e);

  pinMode(pin, OUTPUT);
  digitalWrite(pin, LOW);
  delayMicroseconds(2750);
  digitalWrite(pin, HIGH);
  delayMicroseconds(200);
  Serial.begin(4800);

  Serial.write((byte)0x0);
  Serial.write(command);
  Serial.write(a);
  Serial.write(b);
  Serial.write(c);
  Serial.write(d);
  Serial.write(e);
  Serial.write(checksum);

  Serial.end();
  pinMode(pin, OUTPUT);
  digitalWrite(pin, HIGH);
}

void reset_code(int a, int b, int c, int d, int e)
{
  send_request(0x75, a, b, c, d, e);
}

void try_code(int a, int b, int c, int d, int e)
{
  send_request(0x71, a, b, c, d, e);
}

void setup()
{
  reset_code(1, 2, 3, 4, 5);
  delay(1000);
  try_code(1, 2, 3, 4, 5);
}

void loop() {}
1 Like

The pen-test.ino is Arduino code. It should run on every Arduino board with Serial connected to the default pins 0 and 1. I don't see any reason why Serial should be disabled and the TX pin (1) be forced HIGH afterwards, because that's the default TX state.

1 Like

Thank you very much for your answar, just a last question on the Atemega i need to solder the GPIO cable Green one to PIN 3 ( PD1 ) and The black One to PIN 8 ( GND ) , where i can find the PD1 and GND on the Arduino Nnao? Also do you have a link where i can get one because i found a lot of models and i have no idea wich one should i get, Thank you very much !!

I must to admit i'm really new in arduino and i have no idea how to do it, that why i will like to have it on a portable arduino...

These are pin numbers of the bare ATmega328 chip as sitting on an Arduino UNO. Use TX and GND as labeld on every Arduino board.

Great thx you for your help, just a question is this Arduino bord ok for that ( Cartes et kits de développement - AVR Arduino Pro Mini 328 - 5V/16MHz DEV-11113 SparkFun | Mouser France )

It will work, but how do you want to upload your code?
As a beginner you better use an Arduino with an USB port for program upload from your PC.

Yes good point about cod uploud, i will buy a Arduino With USB, can you send me a link please because they are a lot of arduino with usb.... and also one last question after i uploud the cod solder TX and GND how can i run the cod? the button on the arduino will allow me to do so? or when i power it it will automaticly run the cod?

I don't know your preferences (size, price, extras...).
Système D :wink:

The bootloader starts whenever a power reset or button reset occurs. If no new code is to be loaded then the last uploaded program is started.

1 Like

Thank you very much for your help i will grab some aruduino nano today from amazon

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.